зеркало из https://github.com/microsoft/moc.git
This commit is contained in:
Родитель
fc9eb12ba8
Коммит
18c097d8e1
|
@ -1,15 +1,333 @@
|
|||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
.vscode/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
**/Properties/launchSettings.json
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
vendor/
|
||||
|
|
223
LICENSE
223
LICENSE
|
@ -1,21 +1,202 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1,40 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the Apache v2.0 license.
|
||||
GOCMD=GO111MODULE=on GOARCH=amd64 go
|
||||
GOBUILD=$(GOCMD) build -v #-mod=vendor
|
||||
GOTEST=$(GOCMD) test -v
|
||||
GOHOSTOS=$(strip $(shell $(GOCMD) env get GOHOSTOS))
|
||||
|
||||
# Private repo workaround
|
||||
export GOPRIVATE = github.com/microsoft
|
||||
# Active module mode, as we use go modules to manage dependencies
|
||||
export GO111MODULE=on
|
||||
|
||||
#
|
||||
PKG :=
|
||||
|
||||
all: format test unittest
|
||||
|
||||
.PHONY: vendor
|
||||
vendor:
|
||||
go mod tidy
|
||||
|
||||
format:
|
||||
gofmt -s -w rpc/ pkg/
|
||||
|
||||
bootstrap:
|
||||
GOOS="linux" go get -u google.golang.org/grpc@v1.26.0
|
||||
GOOS="linux" go get -u github.com/golang/protobuf/protoc-gen-go@v1.3.2
|
||||
|
||||
test:
|
||||
GOOS=windows go build ./...
|
||||
|
||||
unittest:
|
||||
$(GOTEST) ./pkg/store
|
||||
$(GOTEST) ./pkg/marshal
|
||||
$(GOTEST) ./pkg/config
|
||||
$(GOTEST) ./pkg/bittree
|
||||
$(GOTEST) ./pkg/addressmanager
|
||||
|
||||
generate: bootstrap
|
||||
(cd rpc && ./gen_proto.sh)
|
|
@ -0,0 +1,15 @@
|
|||
This repository incorporates material as listed below or described in the code.
|
||||
|
||||
Copyright © Microsoft Corporation.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
15
README.md
15
README.md
|
@ -1 +1,14 @@
|
|||
TODO: Create a file called LICENSE (not LICENSE.TXT, LICENSE.md, etc.)…
|
||||
|
||||
# Contributing
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
||||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
|
||||
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
|
||||
|
||||
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
|
||||
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
|
||||
provided by the bot. You will only need to do this once across all repos using our CLA.
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
# Starter pipeline
|
||||
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
||||
# Add steps that build, run tests, deploy, and more:
|
||||
# https://aka.ms/yaml
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
|
||||
steps:
|
||||
- task: InstallSSHKey@0
|
||||
inputs:
|
||||
knownHostsEntry: '$(KNOWN_HOST)'
|
||||
sshPublicKey: '$(SSH_PUBLIC_KEY)'
|
||||
sshKeySecureFile: 'azure-pipelines-ssh-key'
|
||||
- script: |
|
||||
git config --global url.ssh://git@github.com/.insteadOf https://github.com/
|
||||
(cd ~/ && curl -OL https://github.com/google/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip)
|
||||
unzip -o ~/protoc-3.11.4-linux-x86_64.zip -d ~/protoc3
|
||||
sudo mv ~/protoc3/bin/* /usr/local/bin/
|
||||
sudo rm -rf /usr/local/include/google
|
||||
sudo mv ~/protoc3/include/* /usr/local/include/
|
||||
rm -rf ~/protoc3
|
||||
rm -f ~/protoc-3.11.4-linux-x86_64.zip
|
||||
protoc --version
|
||||
export GOPATH=$(go env GOPATH)
|
||||
sudo mkdir -p $GOPATH/src
|
||||
sudo chmod 777 $GOPATH
|
||||
sudo chmod 777 $GOPATH/src
|
||||
export PATH=$PATH:$GOPATH/bin
|
||||
(cd $GOPATH/src && mkdir -p github.com/protocolbuffers && cd github.com/protocolbuffers && git clone https://github.com/protocolbuffers/protobuf.git)
|
||||
make generate
|
||||
displayName: 'Generate Protobuf'
|
||||
- script: |
|
||||
git config --global url.ssh://git@github.com/.insteadOf https://github.com/
|
||||
go version
|
||||
make
|
||||
displayName: 'Build'
|
||||
- script: |
|
||||
make unittest
|
||||
displayName: 'Unit Tests'
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
package wssdcommon
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultServerContextTimeout = 120 * time.Second
|
||||
)
|
|
@ -0,0 +1,78 @@
|
|||
module github.com/microsoft/moc-proto
|
||||
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
contrib.go.opencensus.io/exporter/jaeger v0.2.0
|
||||
github.com/KnicKnic/go-windows v0.0.3-0.20200421223124-91aad71334c6
|
||||
github.com/Microsoft/go-winio v0.4.14
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bgentry/speakeasy v0.1.0 // indirect
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa // indirect
|
||||
github.com/coreos/bbolt v1.3.2 // indirect
|
||||
github.com/coreos/etcd v3.3.18+incompatible // indirect
|
||||
github.com/coreos/go-semver v0.2.0 // indirect
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.0.0 // indirect
|
||||
github.com/coreos/license-bill-of-materials v0.0.0-20190913234955-13baff47494e // indirect
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
|
||||
github.com/creack/pty v1.1.7 // indirect
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4 // indirect
|
||||
github.com/fatih/color v1.7.0 // indirect
|
||||
github.com/go-ole/go-ole v1.2.4
|
||||
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d // indirect
|
||||
github.com/golang/protobuf v1.3.2
|
||||
github.com/google/btree v1.0.0 // indirect
|
||||
github.com/google/go-cmp v0.5.0 // indirect
|
||||
github.com/google/uuid v1.1.1
|
||||
github.com/gorilla/websocket v1.4.0 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.5 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/jmespath/go-jmespath v0.3.0
|
||||
github.com/jonboulle/clockwork v0.1.0 // indirect
|
||||
github.com/json-iterator/go v1.1.9 // indirect
|
||||
github.com/mattn/go-colorable v0.0.9 // indirect
|
||||
github.com/mattn/go-isatty v0.0.4 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.2 // indirect
|
||||
github.com/microsoft/moc v0.8.5
|
||||
github.com/microsoft/wmi v0.2.8
|
||||
github.com/nwoodmsft/iso9660 v0.0.0-20191211094520-15de0aa41e99
|
||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 // indirect
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/prometheus/client_golang v1.0.0 // indirect
|
||||
github.com/prometheus/procfs v0.0.5 // indirect
|
||||
github.com/sirupsen/logrus v1.4.2 // indirect
|
||||
github.com/soheilhy/cmux v0.1.4 // indirect
|
||||
github.com/spf13/cobra v0.0.3 // indirect
|
||||
github.com/spf13/pflag v1.0.1 // indirect
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
|
||||
github.com/urfave/cli v1.20.0 // indirect
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
|
||||
go.etcd.io/bbolt v1.3.3 // indirect
|
||||
go.etcd.io/etcd v3.3.18+incompatible
|
||||
go.opencensus.io v0.22.3
|
||||
go.uber.org/atomic v1.4.0 // indirect
|
||||
go.uber.org/multierr v1.1.0 // indirect
|
||||
go.uber.org/zap v1.10.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381 // indirect
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae
|
||||
golang.org/x/text v0.3.3 // indirect
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
|
||||
google.golang.org/grpc v1.27.0
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.25 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.8
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
|
||||
k8s.io/klog v1.0.0
|
||||
sigs.k8s.io/yaml v1.2.0 // indirect
|
||||
)
|
||||
|
||||
replace (
|
||||
github.com/golang/protobuf/protoc-gen-go => github.com/golang/protobuf/protoc-gen-go v1.3.2
|
||||
google.golang.org/grpc => google.golang.org/grpc v1.26.0
|
||||
)
|
|
@ -0,0 +1,286 @@
|
|||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
contrib.go.opencensus.io/exporter/jaeger v0.2.0 h1:nhTv/Ry3lGmqbJ/JGvCjWxBl5ozRfqo86Ngz59UAlfk=
|
||||
contrib.go.opencensus.io/exporter/jaeger v0.2.0/go.mod h1:ukdzwIYYHgZ7QYtwVFQUjiT28BJHiMhTERo32s6qVgM=
|
||||
github.com/KnicKnic/go-windows v0.0.3-0.20200421223124-91aad71334c6 h1:GiOw3mJSnm+kx7OPka3xptlfgGc/TzQULjFQX/uXpH8=
|
||||
github.com/KnicKnic/go-windows v0.0.3-0.20200421223124-91aad71334c6/go.mod h1:bq9qyrkvAvMH2HPlkix2bE/eDuRz1kzwyoV/ieVhqK0=
|
||||
github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU=
|
||||
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s=
|
||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.18+incompatible h1:Zz1aXgDrFFi1nadh58tA9ktt06cmPTwNNP3dXwIq1lE=
|
||||
github.com/coreos/etcd v3.3.18+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28=
|
||||
github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
|
||||
github.com/coreos/license-bill-of-materials v0.0.0-20190913234955-13baff47494e/go.mod h1:4xMOusJ7xxc84WclVxKT8+lNfGYDwojOUC2OQNCwcj4=
|
||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
|
||||
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
|
||||
github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI=
|
||||
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I=
|
||||
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I=
|
||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
|
||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
|
||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.0 h1:bM6ZAFZmc/wPFaRDi0d5L7hGEZEx/2u+Tmr2evNHDiI=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc=
|
||||
github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=
|
||||
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/microsoft/moc v0.8.5 h1:j1tHRyxsadd87djmWFiB4m4AxYlkmoGkDBAuc2ppYaQ=
|
||||
github.com/microsoft/moc v0.8.5/go.mod h1:u3pjIIl0Xl35cgc5ImC+BTY1F3x6BHi/KuFjCSV01cw=
|
||||
github.com/microsoft/wmi v0.2.3 h1:mj9XBYJhiAxNi0KMUfm8ix9FPWeJuyO2P59RIxZx4sA=
|
||||
github.com/microsoft/wmi v0.2.3/go.mod h1:dCXZgJVjwILNv4HD6VOM356/Yh5MTi393MUbYpUhrHA=
|
||||
github.com/microsoft/wmi v0.2.8 h1:X0oPhmyDo9yx2o/qphBhGsOctDNqgZR2HisQSE8tQHU=
|
||||
github.com/microsoft/wmi v0.2.8/go.mod h1:dCXZgJVjwILNv4HD6VOM356/Yh5MTi393MUbYpUhrHA=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nwoodmsft/iso9660 v0.0.0-20191211094520-15de0aa41e99 h1:Gbj143hRK42N+8O1Uj8z75t17XagZB9eRJk0oczI+GU=
|
||||
github.com/nwoodmsft/iso9660 v0.0.0-20191211094520-15de0aa41e99/go.mod h1:oIuE6nqRO03jsO5LH16blMV11a3d2WF4mh8jZ19/g2A=
|
||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM=
|
||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.5 h1:3+auTFlqw+ZaQYJARz6ArODtkaIwtvBTx3N2NehQlL8=
|
||||
github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k=
|
||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
|
||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
github.com/uber/jaeger-client-go v2.15.0+incompatible h1:NP3qsSqNxh8VYr956ur1N/1C1PjvOJnJykCzcD5QHbk=
|
||||
github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
|
||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
go.etcd.io/bbolt v1.3.2 h1:Z/90sZLPOeCy2PwprqkFa25PdkusRzaj9P8zm/KNyvk=
|
||||
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
|
||||
go.etcd.io/etcd v0.5.0-alpha.5.0.20200218102753-4258cdd2efdf h1:7QRbwQx5hosOG/fIkIKlzun0CgQQJUrUlPsJncLr5NM=
|
||||
go.etcd.io/etcd v0.5.0-alpha.5.0.20200218102753-4258cdd2efdf/go.mod h1:+W0vrHo9w3Fg+8PoemM8K7fM5BYlMABDnX0H7R4Tt60=
|
||||
go.etcd.io/etcd v3.3.18+incompatible h1:5aomL5mqoKHxw6NG+oYgsowk8tU8aOalo2IdZxdWHkw=
|
||||
go.etcd.io/etcd v3.3.18+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=
|
||||
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
|
||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
|
||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo=
|
||||
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/api v0.4.0 h1:KKgc1aqhV8wDPbDzlDtpvyjZFY3vjz85FP7p4wcQUyI=
|
||||
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
|
||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=
|
||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
||||
google.golang.org/genproto v0.0.0-20200702021140-07506425bd67 h1:4BC1C1i30F3MZeiIO6y6IIo4DxrtOwITK87bQl3lhFA=
|
||||
google.golang.org/genproto v0.0.0-20200702021140-07506425bd67/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200706141556-5779274c8e96 h1:L8iMEkPD/F6k/2Ui4/kfwRn5edLwHtfuj/+KK0nlU/E=
|
||||
google.golang.org/genproto v0.0.0-20200706141556-5779274c8e96/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200709005830-7a2ca40e9dc3 h1:JwLN1jVnmIsfE4HkDVe2AblFAbo0Z+4cjteDSOnv6oE=
|
||||
google.golang.org/genproto v0.0.0-20200709005830-7a2ca40e9dc3/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/genproto v0.0.0-20200711021454-869866162049 h1:YFTFpQhgvrLrmxtiIncJxFXeCyq84ixuKWVCaCAi9Oc=
|
||||
google.golang.org/genproto v0.0.0-20200711021454-869866162049/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
|
||||
google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg=
|
||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
|
||||
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
|
|
@ -0,0 +1,337 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
package auth
|
||||
|
||||
import (
|
||||
context "context"
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/microsoft/moc-proto/pkg/certs"
|
||||
"github.com/microsoft/moc-proto/pkg/marshal"
|
||||
"google.golang.org/grpc/credentials"
|
||||
)
|
||||
|
||||
const (
|
||||
ClientTokenName = ".token"
|
||||
ClientCertName = "wssd.pem"
|
||||
ClientTokenPath = "WSSD_CLIENT_TOKEN"
|
||||
WssdConfigPath = "WSSD_CONFIG_PATH"
|
||||
DefaultWSSDFolder = ".wssd"
|
||||
AccessFileDefaultName = "cloudconfig"
|
||||
ServerName = "ServerName"
|
||||
)
|
||||
|
||||
type WssdConfig struct {
|
||||
CloudCertificate string
|
||||
ClientCertificate string
|
||||
ClientKey string
|
||||
}
|
||||
|
||||
type Authorizer interface {
|
||||
WithTransportAuthorization() credentials.TransportCredentials
|
||||
WithRPCAuthorization() credentials.PerRPCCredentials
|
||||
}
|
||||
|
||||
type ManagedIdentityConfig struct {
|
||||
ClientTokenPath string
|
||||
WssdConfigPath string
|
||||
ServerName string
|
||||
}
|
||||
|
||||
type LoginConfig struct {
|
||||
Name string
|
||||
Token string
|
||||
Certificate string
|
||||
}
|
||||
|
||||
func (ba *BearerAuthorizer) WithRPCAuthorization() credentials.PerRPCCredentials {
|
||||
return ba.tokenProvider
|
||||
}
|
||||
|
||||
func (ba *BearerAuthorizer) WithTransportAuthorization() credentials.TransportCredentials {
|
||||
return ba.transportCredentials
|
||||
}
|
||||
|
||||
type JwtTokenProvider struct {
|
||||
RawData string `json:"rawdata"`
|
||||
}
|
||||
|
||||
// BearerAuthorizer implements the bearer authorization
|
||||
type BearerAuthorizer struct {
|
||||
tokenProvider JwtTokenProvider
|
||||
transportCredentials credentials.TransportCredentials
|
||||
}
|
||||
|
||||
// NewBearerAuthorizer crates a BearerAuthorizer using the given token provider
|
||||
func NewBearerAuthorizer(tp JwtTokenProvider, tc credentials.TransportCredentials) *BearerAuthorizer {
|
||||
return &BearerAuthorizer{
|
||||
tokenProvider: tp,
|
||||
transportCredentials: tc,
|
||||
}
|
||||
}
|
||||
|
||||
// EnvironmentSettings contains the available authentication settings.
|
||||
type EnvironmentSettings struct {
|
||||
Values map[string]string
|
||||
}
|
||||
|
||||
func NewAuthorizerFromEnvironment(serverName string) (Authorizer, error) {
|
||||
settings, err := GetSettingsFromEnvironment(serverName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return settings.GetAuthorizer()
|
||||
}
|
||||
|
||||
func NewAuthorizerFromInput(tlsCert tls.Certificate, serverCertificate []byte, server string) (Authorizer, error) {
|
||||
transportCreds := TransportCredentialsFromNode(tlsCert, serverCertificate, server)
|
||||
return NewBearerAuthorizer(JwtTokenProvider{}, transportCreds), nil
|
||||
}
|
||||
|
||||
func NewAuthorizerForAuth(tokenString string, certificate string, server string) (Authorizer, error) {
|
||||
|
||||
serverPem, err := marshal.FromBase64(certificate)
|
||||
if err != nil {
|
||||
return NewBearerAuthorizer(JwtTokenProvider{}, credentials.NewTLS(nil)), fmt.Errorf("could not marshal the server certificate")
|
||||
}
|
||||
|
||||
certPool := x509.NewCertPool()
|
||||
// Append the client certificates from the CA
|
||||
if ok := certPool.AppendCertsFromPEM(serverPem); !ok {
|
||||
return NewBearerAuthorizer(JwtTokenProvider{}, credentials.NewTLS(nil)), fmt.Errorf("could not append the server certificate")
|
||||
}
|
||||
transportCreds := credentials.NewTLS(&tls.Config{
|
||||
ServerName: server,
|
||||
RootCAs: certPool,
|
||||
})
|
||||
|
||||
return NewBearerAuthorizer(JwtTokenProvider{tokenString}, transportCreds), nil
|
||||
}
|
||||
|
||||
func GetSettingsFromEnvironment(serverName string) (s EnvironmentSettings, err error) {
|
||||
s = EnvironmentSettings{
|
||||
Values: map[string]string{},
|
||||
}
|
||||
s.Values[ClientTokenPath] = getClientTokenLocation()
|
||||
s.Values[WssdConfigPath] = GetWssdConfigLocation()
|
||||
|
||||
s.Values[ServerName] = serverName
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (settings EnvironmentSettings) GetAuthorizer() (Authorizer, error) {
|
||||
return settings.GetManagedIdentityConfig().Authorizer()
|
||||
}
|
||||
|
||||
func (settings EnvironmentSettings) GetManagedIdentityConfig() ManagedIdentityConfig {
|
||||
return ManagedIdentityConfig{
|
||||
settings.Values[ClientTokenPath],
|
||||
settings.Values[WssdConfigPath],
|
||||
settings.Values[ServerName],
|
||||
}
|
||||
}
|
||||
|
||||
func (mc ManagedIdentityConfig) Authorizer() (Authorizer, error) {
|
||||
|
||||
jwtCreds := TokenProviderFromFile(mc.ClientTokenPath)
|
||||
transportCreds := TransportCredentialsFromFile(mc.WssdConfigPath, mc.ServerName)
|
||||
|
||||
return NewBearerAuthorizer(jwtCreds, transportCreds), nil
|
||||
}
|
||||
|
||||
func TokenProviderFromFile(tokenLocation string) JwtTokenProvider {
|
||||
data, err := ioutil.ReadFile(tokenLocation)
|
||||
if err != nil {
|
||||
// Call to open the token file most likely failed do to
|
||||
// token not being set. This is expected when the an identity is not yet
|
||||
// set. Log and continue
|
||||
return JwtTokenProvider{}
|
||||
}
|
||||
|
||||
return JwtTokenProvider{string(data)}
|
||||
}
|
||||
|
||||
func TransportCredentialsFromFile(wssdConfigLocation string, server string) credentials.TransportCredentials {
|
||||
clientCerts := []tls.Certificate{}
|
||||
certPool := x509.NewCertPool()
|
||||
|
||||
serverPem, tlsCert, err := readAccessFileToTls(wssdConfigLocation)
|
||||
if err == nil {
|
||||
clientCerts = append(clientCerts, tlsCert)
|
||||
// Append the client certificates from the CA
|
||||
if ok := certPool.AppendCertsFromPEM(serverPem); !ok {
|
||||
return credentials.NewTLS(&tls.Config{})
|
||||
}
|
||||
}
|
||||
verifyPeerCertificate := func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error {
|
||||
// This is the for extra verification
|
||||
return nil
|
||||
}
|
||||
|
||||
return credentials.NewTLS(&tls.Config{
|
||||
ServerName: server,
|
||||
Certificates: clientCerts,
|
||||
RootCAs: certPool,
|
||||
VerifyPeerCertificate: verifyPeerCertificate,
|
||||
})
|
||||
}
|
||||
|
||||
func readAccessFileToTls(accessFileLocation string) ([]byte, tls.Certificate, error) {
|
||||
accessFile := WssdConfig{}
|
||||
err := marshal.FromJSONFile(accessFileLocation, &accessFile)
|
||||
if err != nil {
|
||||
return []byte{}, tls.Certificate{}, err
|
||||
}
|
||||
return AccessFileToTls(accessFile)
|
||||
}
|
||||
func TransportCredentialsFromNode(tlsCert tls.Certificate, serverCertificate []byte, server string) credentials.TransportCredentials {
|
||||
|
||||
certPool := x509.NewCertPool()
|
||||
// Append the client certificates from the CA
|
||||
if ok := certPool.AppendCertsFromPEM(serverCertificate); !ok {
|
||||
return credentials.NewTLS(&tls.Config{})
|
||||
}
|
||||
verifyPeerCertificate := func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error {
|
||||
// This is the for extra verification
|
||||
return nil
|
||||
}
|
||||
|
||||
return credentials.NewTLS(&tls.Config{
|
||||
ServerName: server,
|
||||
Certificates: []tls.Certificate{tlsCert},
|
||||
RootCAs: certPool,
|
||||
VerifyPeerCertificate: verifyPeerCertificate,
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func (c JwtTokenProvider) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error) {
|
||||
return map[string]string{
|
||||
"authorization": c.RawData,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c JwtTokenProvider) RequireTransportSecurity() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func getClientTokenLocation() string {
|
||||
clientTokenPath := os.Getenv(ClientTokenPath)
|
||||
if clientTokenPath == "" {
|
||||
wd, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// Create the default token path and set the
|
||||
// env variable
|
||||
defaultPath := filepath.Join(wd, DefaultWSSDFolder)
|
||||
os.MkdirAll(defaultPath, os.ModePerm)
|
||||
clientTokenPath = filepath.Join(defaultPath, ClientTokenName)
|
||||
os.Setenv(ClientTokenPath, clientTokenPath)
|
||||
}
|
||||
return clientTokenPath
|
||||
}
|
||||
|
||||
func GetWssdConfigLocation() string {
|
||||
wssdConfigPath := os.Getenv(WssdConfigPath)
|
||||
if wssdConfigPath == "" {
|
||||
wd, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// Create the default config path and set the
|
||||
// env variable
|
||||
defaultPath := filepath.Join(wd, DefaultWSSDFolder)
|
||||
os.MkdirAll(defaultPath, os.ModePerm)
|
||||
wssdConfigPath = filepath.Join(defaultPath, AccessFileDefaultName)
|
||||
os.Setenv(WssdConfigPath, wssdConfigPath)
|
||||
}
|
||||
return wssdConfigPath
|
||||
}
|
||||
func SaveToken(tokenStr string) error {
|
||||
return ioutil.WriteFile(
|
||||
getClientTokenLocation(),
|
||||
[]byte(tokenStr),
|
||||
0644)
|
||||
}
|
||||
|
||||
func GenerateClientKey(loginconfig LoginConfig) ([]byte, WssdConfig, error) {
|
||||
certBytes, err := marshal.FromBase64(loginconfig.Certificate)
|
||||
if err != nil {
|
||||
return []byte{}, WssdConfig{}, err
|
||||
}
|
||||
accessFile, err := readAccessFile(GetWssdConfigLocation())
|
||||
if err != nil {
|
||||
x509CertClient, keyClient, err := certs.GenerateClientCertificate(loginconfig.Name)
|
||||
if err != nil {
|
||||
return []byte{}, WssdConfig{}, err
|
||||
}
|
||||
|
||||
certBytesClient := certs.EncodeCertPEM(x509CertClient)
|
||||
keyBytesClient := certs.EncodePrivateKeyPEM(keyClient)
|
||||
|
||||
accessFile = WssdConfig{
|
||||
CloudCertificate: "",
|
||||
ClientCertificate: marshal.ToBase64(string(certBytesClient)),
|
||||
ClientKey: marshal.ToBase64(string(keyBytesClient)),
|
||||
}
|
||||
}
|
||||
|
||||
if accessFile.CloudCertificate != "" {
|
||||
serverPem, err := marshal.FromBase64(accessFile.CloudCertificate)
|
||||
if err != nil {
|
||||
return []byte{}, WssdConfig{}, err
|
||||
}
|
||||
|
||||
if string(certBytes) != string(serverPem) {
|
||||
certBytes = append(certBytes, serverPem...)
|
||||
}
|
||||
}
|
||||
|
||||
accessFile.CloudCertificate = marshal.ToBase64(string(certBytes))
|
||||
return []byte(accessFile.ClientCertificate), accessFile, nil
|
||||
}
|
||||
|
||||
func PrintAccessFile(accessFile WssdConfig) error {
|
||||
return marshal.ToJSONFile(accessFile, GetWssdConfigLocation())
|
||||
}
|
||||
|
||||
func readAccessFile(accessFileLocation string) (WssdConfig, error) {
|
||||
accessFile := WssdConfig{}
|
||||
err := marshal.FromJSONFile(accessFileLocation, &accessFile)
|
||||
if err != nil {
|
||||
return WssdConfig{}, err
|
||||
}
|
||||
|
||||
return accessFile, nil
|
||||
}
|
||||
|
||||
func AccessFileToTls(accessFile WssdConfig) ([]byte, tls.Certificate, error) {
|
||||
serverPem, err := marshal.FromBase64(accessFile.CloudCertificate)
|
||||
if err != nil {
|
||||
return []byte{}, tls.Certificate{}, err
|
||||
}
|
||||
clientPem, err := marshal.FromBase64(accessFile.ClientCertificate)
|
||||
if err != nil {
|
||||
return []byte{}, tls.Certificate{}, err
|
||||
}
|
||||
keyPem, err := marshal.FromBase64(accessFile.ClientKey)
|
||||
if err != nil {
|
||||
return []byte{}, tls.Certificate{}, err
|
||||
}
|
||||
tlsCert, err := tls.X509KeyPair(clientPem, keyPem)
|
||||
if err != nil {
|
||||
return []byte{}, tls.Certificate{}, err
|
||||
}
|
||||
|
||||
return serverPem, tlsCert, nil
|
||||
}
|
|
@ -0,0 +1,180 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
package certs
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/pem"
|
||||
"math"
|
||||
"math/big"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
wssdnet "github.com/microsoft/moc-proto/pkg/net"
|
||||
)
|
||||
|
||||
// KeyPair holds the raw bytes for a certificate and key.
|
||||
type KeyPair struct {
|
||||
Cert, Key []byte
|
||||
}
|
||||
|
||||
// Config contains the basic fields required for creating a certificate.
|
||||
type Config struct {
|
||||
CommonName string
|
||||
Organization []string
|
||||
AltNames AltNames
|
||||
Usages []x509.ExtKeyUsage
|
||||
}
|
||||
|
||||
// AltNames contains the domain names and IP addresses for a cert
|
||||
type AltNames struct {
|
||||
DNSNames []string
|
||||
IPs []net.IP
|
||||
}
|
||||
|
||||
// IsValid returns true if both the certificate and key are non-nil.
|
||||
func (k *KeyPair) IsValid() bool {
|
||||
return k.Cert != nil && k.Key != nil
|
||||
}
|
||||
|
||||
// NewPrivateKey creates an RSA private key
|
||||
func NewPrivateKey() (*rsa.PrivateKey, error) {
|
||||
pk, err := rsa.GenerateKey(rand.Reader, 2048)
|
||||
return pk, err
|
||||
}
|
||||
|
||||
// EncodeCertPEM returns PEM-endcoded certificate data.
|
||||
func EncodeCertPEM(cert *x509.Certificate) []byte {
|
||||
block := pem.Block{
|
||||
Type: "CERTIFICATE",
|
||||
Bytes: cert.Raw,
|
||||
}
|
||||
return pem.EncodeToMemory(&block)
|
||||
}
|
||||
|
||||
// EncodePrivateKeyPEM returns PEM-encoded private key data.
|
||||
func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte {
|
||||
block := pem.Block{
|
||||
Type: "RSA PRIVATE KEY",
|
||||
Bytes: x509.MarshalPKCS1PrivateKey(key),
|
||||
}
|
||||
|
||||
return pem.EncodeToMemory(&block)
|
||||
}
|
||||
|
||||
// EncodePublicKeyPEM returns PEM-encoded public key data.
|
||||
func EncodePublicKeyBytePEM(key []byte) ([]byte, error) {
|
||||
block := pem.Block{
|
||||
Type: "PUBLIC KEY",
|
||||
Bytes: key,
|
||||
}
|
||||
return pem.EncodeToMemory(&block), nil
|
||||
}
|
||||
|
||||
// EncodePublicKeyPEM returns PEM-encoded public key data.
|
||||
func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error) {
|
||||
der, err := x509.MarshalPKIXPublicKey(key)
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return EncodePublicKeyBytePEM(der)
|
||||
}
|
||||
|
||||
// DecodeCertPEM attempts to return a decoded certificate or nil
|
||||
// if the encoded input does not contain a certificate.
|
||||
func DecodeCertPEM(encoded []byte) (*x509.Certificate, error) {
|
||||
block, _ := pem.Decode(encoded)
|
||||
if block == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return x509.ParseCertificate(block.Bytes)
|
||||
}
|
||||
|
||||
// DecodePrivateKeyPEM attempts to return a decoded key or nil
|
||||
// if the encoded input does not contain a private key.
|
||||
func DecodePrivateKeyPEM(encoded []byte) (*rsa.PrivateKey, error) {
|
||||
block, _ := pem.Decode(encoded)
|
||||
if block == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return x509.ParsePKCS1PrivateKey(block.Bytes)
|
||||
}
|
||||
|
||||
func GenerateClientCertificate(name string) (*x509.Certificate, *rsa.PrivateKey, error) {
|
||||
key, err := rsa.GenerateKey(rand.Reader, 2048)
|
||||
if err != nil {
|
||||
return nil, key, err
|
||||
}
|
||||
|
||||
nodeFqdn, err := wssdnet.GetIPAddress()
|
||||
if err != nil {
|
||||
return nil, key, err
|
||||
}
|
||||
|
||||
now := time.Now().UTC()
|
||||
|
||||
tmpl := x509.Certificate{
|
||||
SerialNumber: new(big.Int).SetInt64(0),
|
||||
Subject: pkix.Name{
|
||||
CommonName: name,
|
||||
Organization: []string{"microsoft"},
|
||||
},
|
||||
NotBefore: now.Add(time.Minute * -5),
|
||||
NotAfter: now.Add(time.Hour * 24 * 365 * 10), // 10 years
|
||||
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
|
||||
MaxPathLenZero: true,
|
||||
BasicConstraintsValid: true,
|
||||
MaxPathLen: 0,
|
||||
IsCA: true,
|
||||
DNSNames: []string{"localhost"},
|
||||
IPAddresses: []net.IP{wssdnet.StringToNetIPAddress("127.0.0.1"), wssdnet.StringToNetIPAddress(nodeFqdn)},
|
||||
}
|
||||
|
||||
b, err := x509.CreateCertificate(rand.Reader, &tmpl, &tmpl, key.Public(), key)
|
||||
if err != nil {
|
||||
return nil, key, err
|
||||
}
|
||||
|
||||
x509Cert, err := x509.ParseCertificate(b)
|
||||
if err != nil {
|
||||
return nil, key, err
|
||||
}
|
||||
|
||||
return x509Cert, key, nil
|
||||
}
|
||||
|
||||
func NewSignedCert(key *rsa.PrivateKey, caCert *x509.Certificate, caKey *rsa.PrivateKey, conf Config) (*x509.Certificate, error) {
|
||||
serial, err := rand.Int(rand.Reader, new(big.Int).SetInt64(math.MaxInt64))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
now := time.Now().UTC()
|
||||
|
||||
tmpl := x509.Certificate{
|
||||
SerialNumber: serial,
|
||||
Subject: pkix.Name{
|
||||
CommonName: conf.CommonName,
|
||||
Organization: conf.Organization,
|
||||
},
|
||||
NotBefore: now.Add(time.Minute * -5),
|
||||
NotAfter: now.Add(time.Hour * 24 * 365), // 1 year
|
||||
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
|
||||
ExtKeyUsage: conf.Usages,
|
||||
BasicConstraintsValid: true,
|
||||
DNSNames: conf.AltNames.DNSNames,
|
||||
IPAddresses: conf.AltNames.IPs,
|
||||
}
|
||||
|
||||
b, err := x509.CreateCertificate(rand.Reader, &tmpl, caCert, key.Public(), caKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return x509.ParseCertificate(b)
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
package convert
|
||||
|
||||
// ToStringPtr
|
||||
func ToStringPtr(val string) *string {
|
||||
return &val
|
||||
}
|
||||
|
||||
// ToInt32Ptr
|
||||
func ToInt32Ptr(val int32) *int32 {
|
||||
return &val
|
||||
}
|
|
@ -0,0 +1,172 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
package errors
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
|
||||
perrors "github.com/pkg/errors"
|
||||
"google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
var (
|
||||
NotFound error = errors.New("Not Found")
|
||||
Degraded error = errors.New("Degraded")
|
||||
InvalidConfiguration error = errors.New("Invalid Configuration")
|
||||
InvalidInput error = errors.New("Invalid Input")
|
||||
NotSupported error = errors.New("Not Supported")
|
||||
AlreadyExists error = errors.New("Already Exists")
|
||||
InUse error = errors.New("In Use")
|
||||
Duplicates error = errors.New("Duplicates")
|
||||
InvalidFilter error = errors.New("Invalid Filter")
|
||||
Failed error = errors.New("Failed")
|
||||
InvalidGroup error = errors.New("InvalidGroup")
|
||||
InvalidVersion error = errors.New("InvalidVersion")
|
||||
OldVersion error = errors.New("OldVersion")
|
||||
OutOfCapacity error = errors.New("OutOfCapacity")
|
||||
OutOfMemory error = errors.New("OutOfMemory")
|
||||
UpdateFailed error = errors.New("Update Failed")
|
||||
NotInitialized error = errors.New("Not Initialized")
|
||||
NotImplemented error = errors.New("Not Implemented")
|
||||
OutOfRange error = errors.New("Out of range")
|
||||
AlreadySet error = errors.New("Already Set")
|
||||
NotSet error = errors.New("Not Set")
|
||||
InconsistentState error = errors.New("Inconsistent state")
|
||||
PendingState error = errors.New("Pending state")
|
||||
WrongHost error = errors.New("Wrong host")
|
||||
PoolFull error = errors.New("The pool is full")
|
||||
Unknown error = errors.New("Unknown Reason")
|
||||
)
|
||||
|
||||
func Wrap(cause error, message string) error {
|
||||
return perrors.Wrap(cause, message)
|
||||
}
|
||||
|
||||
func Wrapf(err error, format string, args ...interface{}) error {
|
||||
return perrors.Wrapf(err, format, args...)
|
||||
}
|
||||
|
||||
func GetGRPCErrorCode(err error) codes.Code {
|
||||
if derr, ok := status.FromError(err); ok {
|
||||
return derr.Code()
|
||||
}
|
||||
return codes.Unknown
|
||||
}
|
||||
|
||||
func checkGRPCErrorCode(err error, code codes.Code) bool {
|
||||
if derr, ok := status.FromError(err); ok {
|
||||
return derr.Code() == code
|
||||
}
|
||||
return status.Code(err) == code
|
||||
}
|
||||
|
||||
func IsGRPCUnknown(err error) bool {
|
||||
return checkGRPCErrorCode(err, codes.Unknown)
|
||||
}
|
||||
|
||||
func IsGRPCNotFound(err error) bool {
|
||||
return checkGRPCErrorCode(err, codes.NotFound)
|
||||
}
|
||||
|
||||
func IsGRPCDeadlineExceeded(err error) bool {
|
||||
return checkGRPCErrorCode(err, codes.DeadlineExceeded)
|
||||
}
|
||||
|
||||
func IsGRPCAlreadyExist(err error) bool {
|
||||
return checkGRPCErrorCode(err, codes.AlreadyExists)
|
||||
}
|
||||
|
||||
func IsGRPCUnavailable(err error) bool {
|
||||
return checkGRPCErrorCode(err, codes.Unavailable)
|
||||
}
|
||||
|
||||
func IsGRPCAborted(err error) bool {
|
||||
return checkGRPCErrorCode(err, codes.Aborted)
|
||||
}
|
||||
|
||||
func GetGRPCError(err error) error {
|
||||
if err == nil {
|
||||
return err
|
||||
}
|
||||
if IsNotFound(err) {
|
||||
return status.Errorf(codes.NotFound, err.Error())
|
||||
}
|
||||
if IsAlreadyExists(err) {
|
||||
return status.Errorf(codes.AlreadyExists, err.Error())
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func IsOutOfMemory(err error) bool {
|
||||
return checkError(err, OutOfMemory)
|
||||
}
|
||||
func IsInvalidVersion(err error) bool {
|
||||
return checkError(err, InvalidVersion)
|
||||
}
|
||||
func IsNotFound(err error) bool {
|
||||
return checkError(err, NotFound)
|
||||
}
|
||||
func IsAlreadyExists(err error) bool {
|
||||
return checkError(err, AlreadyExists)
|
||||
}
|
||||
func IsInvalidGroup(err error) bool {
|
||||
return checkError(err, InvalidGroup)
|
||||
}
|
||||
func IsNotInitialized(err error) bool {
|
||||
return checkError(err, NotInitialized)
|
||||
}
|
||||
func IsOutOfRange(err error) bool {
|
||||
return checkError(err, OutOfRange)
|
||||
}
|
||||
func IsAlreadySet(err error) bool {
|
||||
return checkError(err, AlreadySet)
|
||||
}
|
||||
func IsNotSet(err error) bool {
|
||||
return checkError(err, NotSet)
|
||||
}
|
||||
func IsInconsistentState(err error) bool {
|
||||
return checkError(err, InconsistentState)
|
||||
}
|
||||
func IsPendingState(err error) bool {
|
||||
return checkError(err, PendingState)
|
||||
}
|
||||
func IsInUse(err error) bool {
|
||||
return checkError(err, InUse)
|
||||
}
|
||||
func IsWrongHost(err error) bool {
|
||||
return checkError(err, WrongHost)
|
||||
}
|
||||
func IsPoolFull(err error) bool {
|
||||
return checkError(err, PoolFull)
|
||||
}
|
||||
func checkError(wrappedError, err error) bool {
|
||||
if wrappedError == nil {
|
||||
return false
|
||||
}
|
||||
if wrappedError == err {
|
||||
return true
|
||||
}
|
||||
cerr := perrors.Cause(wrappedError)
|
||||
if cerr != nil && cerr == err {
|
||||
return true
|
||||
}
|
||||
|
||||
if !IsGRPCUnknown(err) {
|
||||
return false
|
||||
}
|
||||
|
||||
// Post this, this is a GRPC unknown error
|
||||
// Try to parse the Message and match the error
|
||||
if strings.Contains(wrappedError.Error(), err.Error()) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
}
|
||||
|
||||
func New(errString string) error {
|
||||
return errors.New(errString)
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
package logging
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
|
||||
const BUFFER_SIZE = 1024
|
||||
|
||||
func UploadFile(ctx context.Context, filename string, sendFunc func([]byte, error) error) error {
|
||||
f, err := os.Open(filename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
err = upload(ctx, f, sendFunc)
|
||||
if err != io.EOF {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func upload(ctx context.Context, reader io.Reader, sendFunc func([]byte, error) error) error {
|
||||
var err error
|
||||
for err == nil {
|
||||
buffer := make([]byte, BUFFER_SIZE)
|
||||
_, readErr := reader.Read(buffer)
|
||||
|
||||
err = sendFunc(buffer, readErr)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func Forward(ctx context.Context, sendFunc func([]byte, error) error, recFunc func() ([]byte, error)) error {
|
||||
var err error
|
||||
for err == nil {
|
||||
var buffer []byte
|
||||
buffer, readErr := recFunc()
|
||||
|
||||
err = sendFunc(buffer, readErr)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func ReceiveFile(ctx context.Context, filename string, recFunc func() ([]byte, error)) error {
|
||||
f, err := os.OpenFile(filename, os.O_CREATE, 0644)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = receive(ctx, f, recFunc)
|
||||
if err != io.EOF {
|
||||
// if hit an actual error then we want to clean up the file
|
||||
f.Close()
|
||||
os.Remove(filename)
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func receive(ctx context.Context, writer io.Writer, recFunc func() ([]byte, error)) error {
|
||||
var err error
|
||||
for err == nil {
|
||||
var buffer []byte
|
||||
buffer, err = recFunc()
|
||||
|
||||
_, writeErr := writer.Write(buffer)
|
||||
if writeErr != nil {
|
||||
return writeErr
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
// Package loggingRedirect - Creates a log file the redirects STD output.
|
||||
package logging
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
path "github.com/microsoft/moc-proto/pkg/path"
|
||||
)
|
||||
|
||||
var (
|
||||
oldStdOut *os.File
|
||||
oldStdErr *os.File
|
||||
logFile *os.File
|
||||
)
|
||||
|
||||
func createLogFile(logFileAbsolutePath string, logFileName string) (*os.File, error) {
|
||||
// Create log path
|
||||
os.MkdirAll(logFileAbsolutePath, os.ModeDir)
|
||||
|
||||
err := path.CheckPath(logFileAbsolutePath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
path := filepath.Join(logFileAbsolutePath, logFileName)
|
||||
logFile, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
st, err := logFile.Stat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// If there are contents in the file already, move the file and replace it.
|
||||
if st.Size() > 0 {
|
||||
logFile.Close()
|
||||
os.Rename(path, path+".old")
|
||||
logFile, err = os.Create(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return logFile, nil
|
||||
}
|
||||
|
||||
// StartRedirectingOutput
|
||||
func StartRedirectingOutput(logFileAbsolutePath string, logFileName string) error {
|
||||
// Save previous values
|
||||
oldStdOut = os.Stdout
|
||||
oldStdErr = os.Stderr
|
||||
|
||||
// Create output file
|
||||
var err error
|
||||
logFile, err = createLogFile(logFileAbsolutePath, logFileName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
RedirectStdErr(logFile)
|
||||
// Set output to file
|
||||
os.Stdout = logFile
|
||||
log.SetOutput(logFile)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RestoreOutput
|
||||
func RestoreOutput() {
|
||||
// Restoring previous values
|
||||
os.Stdout = oldStdOut
|
||||
os.Stderr = oldStdErr
|
||||
log.SetOutput(os.Stderr)
|
||||
|
||||
if logFile != nil {
|
||||
// Close log file
|
||||
logFile.Close()
|
||||
logFile = nil
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
//+build unix
|
||||
package logging
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func RedirectStdErr(file *os.File) {
|
||||
err := syscall.Dup2(int(file.Fd()), int(os.Stderr.Fd()))
|
||||
if err != nil {
|
||||
}
|
||||
return
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
//+build windows
|
||||
package logging
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
var (
|
||||
kernel32 = syscall.MustLoadDLL("kernel32.dll")
|
||||
procSetStdHandle = kernel32.MustFindProc("SetStdHandle")
|
||||
)
|
||||
|
||||
func setStdHandle(stdhandle int32, handle syscall.Handle) error {
|
||||
r0, _, e1 := syscall.Syscall(procSetStdHandle.Addr(), 2, uintptr(stdhandle), uintptr(handle), 0)
|
||||
if r0 == 0 {
|
||||
if e1 != 0 {
|
||||
return error(e1)
|
||||
}
|
||||
return syscall.EINVAL
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func RedirectStdErr(file *os.File) {
|
||||
err := setStdHandle(syscall.STD_ERROR_HANDLE, syscall.Handle(file.Fd()))
|
||||
if err != nil {
|
||||
}
|
||||
os.Stderr = file
|
||||
return
|
||||
}
|
|
@ -0,0 +1,291 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
package marshal
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/sha512"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"gopkg.in/yaml.v3"
|
||||
"io/ioutil"
|
||||
"reflect"
|
||||
"sort"
|
||||
)
|
||||
|
||||
func Duplicate(data interface{}, duplicatedData interface{}) error {
|
||||
dataBytes, err := ToJSONBytes(data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = FromJSONBytes(dataBytes, duplicatedData)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func ToString(data interface{}) string {
|
||||
yamlStr, _ := ToYAML(data)
|
||||
return yamlStr
|
||||
}
|
||||
|
||||
func ToJSON(data interface{}) (string, error) {
|
||||
jsonBytes, err := ToJSONBytes(data)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(jsonBytes), nil
|
||||
}
|
||||
func ToJSONBytes(data interface{}) ([]byte, error) {
|
||||
return json.Marshal(data)
|
||||
}
|
||||
|
||||
// json.Marshal writes some characters (e.g. '<') as unicode. This stops that to make logsa easier to read.
|
||||
func ToUnescapedJSONBytes(data interface{}) ([]byte, error) {
|
||||
var buffer bytes.Buffer
|
||||
e := json.NewEncoder(&buffer)
|
||||
e.SetEscapeHTML(false)
|
||||
err := e.Encode(data)
|
||||
return buffer.Bytes(), err
|
||||
}
|
||||
|
||||
// ToJSONFile writes the data to path in YAML format
|
||||
func ToJSONFile(data interface{}, path string) error {
|
||||
enc, err := ToJSONBytes(data)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(path, enc, 0644)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func FromJSON(jsonString string, object interface{}) error {
|
||||
return json.Unmarshal([]byte(jsonString), object)
|
||||
}
|
||||
|
||||
func FromJSONBytes(jsonBytes []byte, object interface{}) error {
|
||||
return json.Unmarshal(jsonBytes, object)
|
||||
}
|
||||
|
||||
func FromJSONFile(path string, object interface{}) error {
|
||||
contents, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return FromJSONBytes(contents, object)
|
||||
}
|
||||
|
||||
func ToBase64(data string) string {
|
||||
return base64.StdEncoding.EncodeToString([]byte(data))
|
||||
}
|
||||
|
||||
func FromBase64(data string) ([]byte, error) {
|
||||
return base64.StdEncoding.DecodeString(data)
|
||||
}
|
||||
|
||||
func ToBase64URL(data string) string {
|
||||
return base64.URLEncoding.EncodeToString([]byte(data))
|
||||
}
|
||||
|
||||
func FromBase64URL(data string) ([]byte, error) {
|
||||
return base64.URLEncoding.DecodeString(data)
|
||||
}
|
||||
|
||||
func ToYAML(data interface{}) (string, error) {
|
||||
yamlBytes, err := yaml.Marshal(data)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(yamlBytes), nil
|
||||
}
|
||||
func ToYAMLBytes(data interface{}) ([]byte, error) {
|
||||
return yaml.Marshal(data)
|
||||
}
|
||||
|
||||
func FingerprintObject(data interface{}) (*[]byte, error) {
|
||||
yamlBytes, err := ToJSONBytes(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Generate the figerprint
|
||||
sum := sha512.Sum512(yamlBytes)
|
||||
sumSlice := sum[:]
|
||||
return &sumSlice, nil
|
||||
}
|
||||
|
||||
// ToYAMLFile writes the data to path in YAML format
|
||||
func ToYAMLFile(data interface{}, path string) error {
|
||||
enc, err := ToYAMLBytes(data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = ioutil.WriteFile(path, enc, 0644)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func FromYAMLBytes(yamlData []byte, object interface{}) error {
|
||||
return yaml.Unmarshal(yamlData, object)
|
||||
}
|
||||
|
||||
func FromYAMLString(yamlString string, object interface{}) error {
|
||||
return FromYAMLBytes([]byte(yamlString), object)
|
||||
}
|
||||
|
||||
func FromYAMLFile(path string, object interface{}) error {
|
||||
contents, err := ioutil.ReadFile(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return FromYAMLBytes(contents, object)
|
||||
}
|
||||
|
||||
func ToTSV(data interface{}) (string, error) {
|
||||
jsonBytes, err := ToTSVBytes(data)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(jsonBytes), nil
|
||||
}
|
||||
|
||||
func ToTSVBytes(data interface{}) ([]byte, error) {
|
||||
return marshalTSV(data)
|
||||
}
|
||||
|
||||
func marshalTSV(result interface{}) ([]byte, error) {
|
||||
var bytes []byte
|
||||
items := reflect.ValueOf(result)
|
||||
if items.Kind() == reflect.Slice {
|
||||
for i := 0; i < items.Len(); i++ {
|
||||
str, err := marshalOneTSVElement(items.Index(i).Interface())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
bytes = append(bytes, str...)
|
||||
if i < items.Len()-1 {
|
||||
bytes = append(bytes, '\n')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
str, err := marshalOneTSVElement(result)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
bytes = append(bytes, str...)
|
||||
}
|
||||
|
||||
return bytes, nil
|
||||
}
|
||||
|
||||
func marshalOneTSVElement(result interface{}) ([]byte, error) {
|
||||
var str []byte
|
||||
switch v := result.(type) {
|
||||
case string:
|
||||
str = []byte(v)
|
||||
case map[string]interface{}:
|
||||
var tabString string
|
||||
|
||||
// golang maps purposely store keys and values in a random order.
|
||||
// The order typically changes from one map instance to another.
|
||||
// In order to provide result consistency, we first sort keys
|
||||
// alphabetically then get the associated values
|
||||
keys := make([]string, 0, len(v))
|
||||
for k := range v {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
for i, key := range keys {
|
||||
typ, ok := v[key].(string)
|
||||
if ok && typ != "" {
|
||||
tabString += typ
|
||||
if i < len(keys)-1 {
|
||||
tabString += "\t"
|
||||
}
|
||||
}
|
||||
}
|
||||
str = []byte(tabString)
|
||||
default:
|
||||
return nil, fmt.Errorf("Unsupported Format")
|
||||
}
|
||||
return str, nil
|
||||
}
|
||||
|
||||
func ToCSV(data interface{}) (string, error) {
|
||||
jsonBytes, err := marshalCSV(data)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(jsonBytes), nil
|
||||
}
|
||||
|
||||
func ToCSVBytes(data interface{}) ([]byte, error) {
|
||||
return marshalCSV(data)
|
||||
}
|
||||
|
||||
func marshalCSV(result interface{}) ([]byte, error) {
|
||||
var bytes []byte
|
||||
items := reflect.ValueOf(result)
|
||||
if items.Kind() == reflect.Slice {
|
||||
for i := 0; i < items.Len(); i++ {
|
||||
str, err := marshalOneCSVElement(items.Index(i).Interface())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
bytes = append(bytes, str...)
|
||||
if i < items.Len()-1 {
|
||||
bytes = append(bytes, '\n')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
str, err := marshalOneCSVElement(result)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
bytes = append(bytes, str...)
|
||||
}
|
||||
|
||||
return bytes, nil
|
||||
}
|
||||
|
||||
func marshalOneCSVElement(result interface{}) ([]byte, error) {
|
||||
var str []byte
|
||||
switch v := result.(type) {
|
||||
case string:
|
||||
str = []byte(v)
|
||||
case map[string]interface{}:
|
||||
var tabString string
|
||||
|
||||
// golang maps purposely store keys and values in a random order.
|
||||
// The order typically changes from one map instance to another.
|
||||
// In order to provide result consistency, we first sort keys
|
||||
// alphabetically then get the associated values
|
||||
keys := make([]string, 0, len(v))
|
||||
for k := range v {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
sort.Strings(keys)
|
||||
for i, key := range keys {
|
||||
typ, ok := v[key].(string)
|
||||
if ok && typ != "" {
|
||||
tabString += typ
|
||||
if i < len(keys)-1 {
|
||||
tabString += ","
|
||||
}
|
||||
}
|
||||
}
|
||||
str = []byte(tabString)
|
||||
default:
|
||||
return nil, fmt.Errorf("Unsupported Format")
|
||||
}
|
||||
return str, nil
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
package marshal
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
type testStruct struct {
|
||||
StringVal string
|
||||
IntVal int
|
||||
}
|
||||
|
||||
var tmp *testStruct
|
||||
|
||||
func init() {
|
||||
tmp = &testStruct{
|
||||
StringVal: "strVal",
|
||||
IntVal: 134,
|
||||
}
|
||||
os.MkdirAll("/tmp/marshal", os.ModePerm)
|
||||
}
|
||||
|
||||
func Test_ToJSON(t *testing.T) {
|
||||
str, err := ToJSON(tmp)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to Marshal to JSON")
|
||||
}
|
||||
t.Logf("%+v", str)
|
||||
}
|
||||
func Test_ToJSONFile(t *testing.T) {
|
||||
err := ToJSONFile(tmp, "/tmp/marshal/tmp.json")
|
||||
if err != nil {
|
||||
t.Errorf("Failed to Marshal to JSON")
|
||||
}
|
||||
}
|
||||
func Test_FromJSONFile(t *testing.T) {
|
||||
newTmp := testStruct{}
|
||||
err := FromJSONFile("/tmp/marshal/tmp.json", &newTmp)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to Marshal to JSON")
|
||||
}
|
||||
t.Logf("%+v", newTmp)
|
||||
}
|
||||
|
||||
func Test_FromJSON(t *testing.T) {
|
||||
var result struct {
|
||||
Value string `json:"value,omitempty"`
|
||||
Data int `json:"Data,omitempty"`
|
||||
}
|
||||
|
||||
err := FromJSON(`{"value": "test", "Data": 1234}`, &result)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to Marshal from JSON - %v", err)
|
||||
}
|
||||
str, err := ToJSON(result)
|
||||
t.Logf("%s", str)
|
||||
}
|
||||
func Test_ToYAML(t *testing.T) {
|
||||
str, err := ToYAML(tmp)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to Marshal to YAML")
|
||||
}
|
||||
t.Logf("%+v", str)
|
||||
|
||||
}
|
||||
func Test_FromYAML(t *testing.T) {}
|
||||
|
||||
func Test_ToYAMLFile(t *testing.T) {
|
||||
err := ToYAMLFile(tmp, "/tmp/marshal/tmp.json")
|
||||
if err != nil {
|
||||
t.Errorf("Failed to Marshal to JSON")
|
||||
}
|
||||
}
|
||||
func Test_FromYAMLFile(t *testing.T) {
|
||||
newTmp := testStruct{}
|
||||
err := FromYAMLFile("/tmp/marshal/tmp.json", &newTmp)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to Marshal to JSON")
|
||||
}
|
||||
t.Logf("%+v", newTmp)
|
||||
}
|
||||
|
||||
func Test_ToString(t *testing.T) {
|
||||
str := ToString(tmp)
|
||||
if len(str) == 0 {
|
||||
t.Errorf("Failed to Marshal to String")
|
||||
}
|
||||
t.Logf("%+v", str)
|
||||
|
||||
}
|
||||
|
||||
func Test_Duplicate(t *testing.T) {
|
||||
tmp1 := &testStruct{}
|
||||
err := Duplicate(tmp, tmp1)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to Duplicate struct ")
|
||||
}
|
||||
t.Logf("Src: [%s], Dst [%s]", ToString(tmp), ToString(tmp1))
|
||||
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
package net
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
"net"
|
||||
)
|
||||
|
||||
func GetIPAddress() (string, error) {
|
||||
conn, err := net.Dial("udp", "8.8.8.8:80")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
return conn.LocalAddr().(*net.UDPAddr).IP.String(), nil
|
||||
}
|
||||
|
||||
func StringToNetIPAddress(ipString string) net.IP {
|
||||
return net.ParseIP(ipString)
|
||||
}
|
||||
|
||||
func ParseMAC(macString string) (net.HardwareAddr, error) {
|
||||
var macInt big.Int
|
||||
|
||||
// Hyper-V uses non-standard MAC address formats (with no colons and no dashes)
|
||||
_, success := macInt.SetString(macString, 16)
|
||||
if success {
|
||||
macBytes := macInt.Bytes()
|
||||
for i := len(macBytes); i < 6; i++ {
|
||||
macBytes = append([]byte{0}, macBytes...)
|
||||
}
|
||||
hardwareAddr := net.HardwareAddr(macBytes)
|
||||
return hardwareAddr, nil
|
||||
}
|
||||
|
||||
hardwareAddr, err := net.ParseMAC(macString)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return hardwareAddr, nil
|
||||
}
|
||||
|
||||
func Or(ip, ip1 net.IP) net.IP {
|
||||
b := make([]byte, len(ip))
|
||||
for i := 0; i < len(ip); i++ {
|
||||
b[i] = ip[i] | ip1[i]
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func Not(ip net.IP) net.IP {
|
||||
b := make([]byte, len(ip))
|
||||
for i := 0; i < len(ip); i++ {
|
||||
b[i] = ^ip[i]
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func Increment(ip net.IP) net.IP {
|
||||
newip := make([]byte, len(ip))
|
||||
copy(newip, ip)
|
||||
for i := len(ip) - 1; i >= 0; i-- {
|
||||
newip[i] = ip[i] + 1
|
||||
if newip[i] > 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return newip
|
||||
}
|
||||
|
||||
func Decrement(ip net.IP) net.IP {
|
||||
newip := make([]byte, len(ip))
|
||||
copy(newip, ip)
|
||||
for i := len(ip) - 1; i >= 0; i-- {
|
||||
newip[i] = ip[i] - 1
|
||||
if newip[i] < 255 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return newip
|
||||
}
|
||||
|
||||
func GetCIDR(startip, endip net.IP) (*net.IPNet, error) {
|
||||
|
||||
var prefixlen uint = 0
|
||||
for i := 0; i < len(startip); i++ {
|
||||
if startip[i] == endip[i] {
|
||||
prefixlen += 8
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
mask := net.CIDRMask(int(prefixlen), len(startip)*8)
|
||||
|
||||
//Find the start of the CIDR we need to allocate
|
||||
rangeStartIP := startip.Mask(mask)
|
||||
//fmt.Printf("the range to allocate for %s - %s is: %s\\%d\n", sip, eip, rangeStartIP, prefixlen)
|
||||
|
||||
return &net.IPNet{
|
||||
IP: rangeStartIP,
|
||||
Mask: mask,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func PrefixesOverlap(cidr1 net.IPNet, cidr2 net.IPNet) bool {
|
||||
if cidr1.Contains(cidr2.IP) || cidr2.Contains(cidr1.IP) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
|
@ -0,0 +1,176 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
//
|
||||
package net
|
||||
|
||||
import (
|
||||
"net"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func Test_Or(t *testing.T) {
|
||||
var ip1, ip2, ip3 net.IP
|
||||
|
||||
ip1 = net.ParseIP("255.255.0.0")
|
||||
ip2 = net.ParseIP("0.0.255.255")
|
||||
ip3 = Or(ip1, ip2)
|
||||
require.Equal(t, net.ParseIP("255.255.255.255"), ip3)
|
||||
|
||||
ip1 = net.ParseIP("0.0.0.0")
|
||||
ip2 = net.ParseIP("0.0.0.0")
|
||||
ip3 = Or(ip1, ip2)
|
||||
require.Equal(t, net.ParseIP("0.0.0.0"), ip3)
|
||||
|
||||
ip1 = net.ParseIP("255.255.255.255")
|
||||
ip2 = net.ParseIP("255.255.255.255")
|
||||
ip3 = Or(ip1, ip2)
|
||||
require.Equal(t, net.ParseIP("255.255.255.255"), ip3)
|
||||
|
||||
ip1 = net.ParseIP("170.170.170.170")
|
||||
ip2 = net.ParseIP("85.85.85.85")
|
||||
ip3 = Or(ip1, ip2)
|
||||
require.Equal(t, net.ParseIP("255.255.255.255"), ip3)
|
||||
}
|
||||
|
||||
func Test_Not(t *testing.T) {
|
||||
var ip1, ip2 net.IP
|
||||
|
||||
ip1 = net.ParseIP("0.0.0.0").To4()
|
||||
ip2 = Not(ip1)
|
||||
require.Equal(t, net.ParseIP("255.255.255.255").To4(), ip2)
|
||||
|
||||
ip1 = net.ParseIP("255.255.255.255").To4()
|
||||
ip2 = Not(ip1)
|
||||
require.Equal(t, net.ParseIP("0.0.0.0").To4(), ip2)
|
||||
|
||||
ip1 = net.ParseIP("170.170.170.170").To4()
|
||||
ip2 = Not(ip1)
|
||||
require.Equal(t, net.ParseIP("85.85.85.85").To4(), ip2)
|
||||
|
||||
}
|
||||
|
||||
func Test_Increment(t *testing.T) {
|
||||
var ip1, ip2 net.IP
|
||||
|
||||
ip1 = net.ParseIP("0.0.0.0")
|
||||
ip2 = Increment(ip1)
|
||||
require.Equal(t, net.ParseIP("0.0.0.1"), ip2)
|
||||
|
||||
ip1 = net.ParseIP("0.0.0.255")
|
||||
ip2 = Increment(ip1)
|
||||
require.Equal(t, net.ParseIP("0.0.1.0"), ip2)
|
||||
|
||||
ip1 = net.ParseIP("0.0.255.255")
|
||||
ip2 = Increment(ip1)
|
||||
require.Equal(t, net.ParseIP("0.1.0.0"), ip2)
|
||||
|
||||
ip1 = net.ParseIP("0.255.255.255")
|
||||
ip2 = Increment(ip1)
|
||||
require.Equal(t, net.ParseIP("1.0.0.0"), ip2)
|
||||
|
||||
ip1 = net.ParseIP("255.255.255.255").To4()
|
||||
ip2 = Increment(ip1)
|
||||
require.Equal(t, net.ParseIP("0.0.0.0").To4(), ip2)
|
||||
|
||||
}
|
||||
func Test_Decrement(t *testing.T) {
|
||||
var ip1, ip2 net.IP
|
||||
|
||||
ip1 = net.ParseIP("0.0.0.1")
|
||||
ip2 = Decrement(ip1)
|
||||
require.Equal(t, net.ParseIP("0.0.0.1"), ip1)
|
||||
require.Equal(t, net.ParseIP("0.0.0.0"), ip2)
|
||||
|
||||
ip1 = net.ParseIP("255.255.255.255")
|
||||
ip2 = Decrement(ip1)
|
||||
require.Equal(t, net.ParseIP("255.255.255.254"), ip2)
|
||||
|
||||
ip1 = net.ParseIP("255.255.255.0")
|
||||
ip2 = Decrement(ip1)
|
||||
require.Equal(t, net.ParseIP("255.255.254.255"), ip2)
|
||||
|
||||
ip1 = net.ParseIP("255.255.0.0")
|
||||
ip2 = Decrement(ip1)
|
||||
require.Equal(t, net.ParseIP("255.254.255.255"), ip2)
|
||||
|
||||
ip1 = net.ParseIP("255.0.0.0")
|
||||
ip2 = Decrement(ip1)
|
||||
require.Equal(t, net.ParseIP("254.255.255.255"), ip2)
|
||||
|
||||
ip1 = net.ParseIP("0.0.0.0").To4()
|
||||
ip2 = Decrement(ip1)
|
||||
require.Equal(t, net.ParseIP("255.255.255.255").To4(), ip2)
|
||||
}
|
||||
|
||||
func Test_PrefixesOverlap(t *testing.T) {
|
||||
_, cidr1, _ := net.ParseCIDR("192.10.0.0/16")
|
||||
_, cidr2, _ := net.ParseCIDR("192.10.0.0/16")
|
||||
require.True(t, PrefixesOverlap(*cidr1, *cidr2))
|
||||
require.True(t, PrefixesOverlap(*cidr2, *cidr1))
|
||||
|
||||
_, cidr2, _ = net.ParseCIDR("192.10.0.0/32")
|
||||
require.True(t, PrefixesOverlap(*cidr1, *cidr2))
|
||||
require.True(t, PrefixesOverlap(*cidr2, *cidr1))
|
||||
|
||||
_, cidr2, _ = net.ParseCIDR("192.10.1.0/24")
|
||||
require.True(t, PrefixesOverlap(*cidr1, *cidr2))
|
||||
require.True(t, PrefixesOverlap(*cidr2, *cidr1))
|
||||
|
||||
_, cidr2, _ = net.ParseCIDR("192.10.255.255/32")
|
||||
require.True(t, PrefixesOverlap(*cidr1, *cidr2))
|
||||
require.True(t, PrefixesOverlap(*cidr2, *cidr1))
|
||||
|
||||
_, cidr2, _ = net.ParseCIDR("192.11.0.0/24")
|
||||
require.False(t, PrefixesOverlap(*cidr1, *cidr2))
|
||||
require.False(t, PrefixesOverlap(*cidr2, *cidr1))
|
||||
}
|
||||
|
||||
func Test_GetCIDR(t *testing.T) {
|
||||
var startip, endip net.IP
|
||||
var cidr *net.IPNet
|
||||
var err error
|
||||
var prefixlen int
|
||||
|
||||
startip = net.ParseIP("192.168.0.0")
|
||||
endip = net.ParseIP("192.168.0.255")
|
||||
|
||||
cidr, err = GetCIDR(startip, endip)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, cidr.IP, net.ParseIP("192.168.0.0"))
|
||||
prefixlen, _ = cidr.Mask.Size()
|
||||
//require.Equal(t, 24, prefixlen)
|
||||
require.Equal(t, 120, prefixlen)
|
||||
|
||||
startip = net.ParseIP("192.168.0.0")
|
||||
endip = net.ParseIP("192.168.255.255")
|
||||
|
||||
cidr, err = GetCIDR(startip, endip)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, cidr.IP, net.ParseIP("192.168.0.0"))
|
||||
prefixlen, _ = cidr.Mask.Size()
|
||||
//require.Equal(t, 16, prefixlen)
|
||||
require.Equal(t, 112, prefixlen)
|
||||
|
||||
startip = net.ParseIP("192.168.0.1")
|
||||
endip = net.ParseIP("192.168.0.2")
|
||||
|
||||
cidr, err = GetCIDR(startip, endip)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, cidr.IP, net.ParseIP("192.168.0.0"))
|
||||
prefixlen, _ = cidr.Mask.Size()
|
||||
//require.Equal(t, 28, prefixlen)
|
||||
require.Equal(t, 120, prefixlen)
|
||||
|
||||
startip = net.ParseIP("192.168.0.5")
|
||||
endip = net.ParseIP("192.168.0.5")
|
||||
|
||||
cidr, err = GetCIDR(startip, endip)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, cidr.IP, net.ParseIP("192.168.0.5"))
|
||||
prefixlen, _ = cidr.Mask.Size()
|
||||
//require.Equal(t, 24, prefixlen)
|
||||
require.Equal(t, 128, prefixlen)
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
// Package path has code for working with windows paths.
|
||||
package path
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// CheckPath verifies that the path provided exists and returns the absolute path.
|
||||
func CheckPath(path string) error {
|
||||
cleanPath := filepath.Clean(path)
|
||||
fileInfo, err := os.Stat(cleanPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !fileInfo.IsDir() {
|
||||
return fmt.Errorf("%s is not a directory", path)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
// Copyright (c) Microsoft Corporation
|
||||
// Licensed under the Apache v2.0 license.
|
||||
package status
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/microsoft/moc-proto/pkg/marshal"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
)
|
||||
|
||||
// InitStatus
|
||||
func InitStatus() *common.Status {
|
||||
return &common.Status{
|
||||
Health: &common.Health{},
|
||||
ProvisioningStatus: &common.ProvisionStatus{},
|
||||
LastError: &common.Error{},
|
||||
Version: GenerateVersion(),
|
||||
}
|
||||
}
|
||||
|
||||
// SetError
|
||||
func SetError(s *common.Status, err error) {
|
||||
if err != nil {
|
||||
s.LastError.Message = fmt.Sprintf("%+v", err)
|
||||
} else {
|
||||
s.LastError.Message = "" // Clear the error
|
||||
}
|
||||
}
|
||||
|
||||
// SetHealth
|
||||
func SetHealth(s *common.Status, hState common.HealthState, err ...error) {
|
||||
s.Health.PreviousState = s.Health.CurrentState
|
||||
s.Health.CurrentState = hState
|
||||
if len(err) > 0 {
|
||||
SetError(s, err[0])
|
||||
}
|
||||
}
|
||||
|
||||
func IsHealthStateMissing(s *common.Status) bool {
|
||||
hstatus := s.GetHealth().GetCurrentState()
|
||||
return (hstatus == common.HealthState_MISSING)
|
||||
}
|
||||
|
||||
func IsDeleted(s *common.Status) bool {
|
||||
return (IsProvisionStatus(s, common.ProvisionState_DELETED) ||
|
||||
IsProvisionStatus(s, common.ProvisionState_DEPROVISIONED))
|
||||
}
|
||||
|
||||
func IsProvisionStatus(s *common.Status, pState common.ProvisionState) bool {
|
||||
return s.ProvisioningStatus.CurrentState == pState
|
||||
}
|
||||
|
||||
// SetProvisionStatus
|
||||
func SetProvisionStatus(s *common.Status, pState common.ProvisionState, err ...error) {
|
||||
s.ProvisioningStatus.PreviousState = s.ProvisioningStatus.CurrentState
|
||||
s.ProvisioningStatus.CurrentState = pState
|
||||
if len(err) > 0 {
|
||||
SetError(s, err[0])
|
||||
}
|
||||
}
|
||||
|
||||
// GenerateVersion
|
||||
func GenerateVersion() *common.Version {
|
||||
return &common.Version{
|
||||
Number: strconv.FormatInt(time.Now().UnixNano(), 10),
|
||||
}
|
||||
}
|
||||
|
||||
// GetProvisioningState string
|
||||
func GetProvisioningState(status *common.ProvisionStatus) *string {
|
||||
stateString := status.GetCurrentState().String()
|
||||
return &stateString
|
||||
}
|
||||
|
||||
// GetStatuses - converts status to map
|
||||
func GetStatuses(status *common.Status) map[string]*string {
|
||||
statuses := map[string]*string{}
|
||||
pstate := status.GetProvisioningStatus().String()
|
||||
statuses["ProvisionState"] = &pstate
|
||||
hstate := status.GetHealth().String()
|
||||
statuses["HealthState"] = &hstate
|
||||
estate := status.GetLastError().String()
|
||||
statuses["Error"] = &estate
|
||||
version := status.GetVersion().Number
|
||||
statuses["Version"] = &version
|
||||
return statuses
|
||||
}
|
||||
|
||||
// GetFromStatuses - parses the map to status
|
||||
func GetFromStatuses(statuses map[string]*string) (status *common.Status) {
|
||||
status = &common.Status{}
|
||||
if val, ok := statuses["ProvisionState"]; ok {
|
||||
ps := common.ProvisionStatus{}
|
||||
_ = marshal.FromJSON(*val, &ps)
|
||||
status.ProvisioningStatus = &ps
|
||||
}
|
||||
if val, ok := statuses["HealthState"]; ok {
|
||||
ps := common.Health{}
|
||||
_ = marshal.FromJSON(*val, &ps)
|
||||
status.Health = &ps
|
||||
}
|
||||
if val, ok := statuses["Error"]; ok {
|
||||
ps := common.Error{}
|
||||
_ = marshal.FromJSON(*val, &ps)
|
||||
status.LastError = &ps
|
||||
}
|
||||
return
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
# Generating ProtoBuf
|
||||
|
||||
Here you will learn how to generate Proto buffers for the node agent
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### protoc-gen-go
|
||||
|
||||
The simplest way to install protoc-gen-go is to run
|
||||
|
||||
`go get -u github.com/golang/protobuf/protoc-gen-go`
|
||||
|
||||
The compiler plugin, protoc-gen-go, will be installed in `$GOPATH/bin` unless `$GOBIN` is set. It must be in your `$PATH` for the protocol compiler, protoc, to find it.
|
||||
|
||||
## additional steps for building
|
||||
|
||||
If when calling protoc you get "File not found" errors on resolving imports
|
||||
|
||||
`go get github.com/protocolbuffers/protobuf`
|
||||
|
||||
Will download the source for protobuf and it should resolve the problems
|
||||
|
||||
## Running gen_proto.sh
|
||||
|
||||
Note: make sure you use GOOS="linux" when you get the protoc-gen-go tool, otherwise the Windows version will be downloaded and it will be incompatible with our gen scripts.
|
||||
|
||||
`chmod +x ./gen_proto.sh`
|
||||
`./gen_proto.sh`
|
||||
|
||||
You should now see some `*.pb.go` files in the directory
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# Generating ProtoBuf
|
||||
|
||||
Here you will learn how to generate Proto buffers for the node agent
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### protoc-gen-go
|
||||
|
||||
The simplest way to install protoc-gen-go is to run
|
||||
|
||||
`go get -u github.com/golang/protobuf/protoc-gen-go`
|
||||
|
||||
The compiler plugin, protoc-gen-go, will be installed in `$GOPATH/bin` unless `$GOBIN` is set. It must be in your `$PATH` for the protocol compiler, protoc, to find it.
|
||||
|
||||
## Running gen_proto.sh
|
||||
|
||||
Note: make sure you use GOOS="linux" when you get the protoc-gen-go tool, otherwise the Windows version will be downloaded and it will be incompatible with our gen scripts.
|
||||
|
||||
`chmod +x ./gen_proto.sh`
|
||||
`./gen_proto.sh`
|
||||
|
||||
You should now see some `*.pb.go` files in the directory
|
|
@ -0,0 +1,295 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: credentialmonitor.proto
|
||||
|
||||
package admin
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type CertificateStatus int32
|
||||
|
||||
const (
|
||||
CertificateStatus_Single CertificateStatus = 0
|
||||
CertificateStatus_Overlap CertificateStatus = 1
|
||||
)
|
||||
|
||||
var CertificateStatus_name = map[int32]string{
|
||||
0: "Single",
|
||||
1: "Overlap",
|
||||
}
|
||||
|
||||
var CertificateStatus_value = map[string]int32{
|
||||
"Single": 0,
|
||||
"Overlap": 1,
|
||||
}
|
||||
|
||||
func (x CertificateStatus) String() string {
|
||||
return proto.EnumName(CertificateStatus_name, int32(x))
|
||||
}
|
||||
|
||||
func (CertificateStatus) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0e30998b3c2b899e, []int{0}
|
||||
}
|
||||
|
||||
type CredentialMonitorRequest struct {
|
||||
CredentialMonitor *CredentialMonitor `protobuf:"bytes,1,opt,name=CredentialMonitor,proto3" json:"CredentialMonitor,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CredentialMonitorRequest) Reset() { *m = CredentialMonitorRequest{} }
|
||||
func (m *CredentialMonitorRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CredentialMonitorRequest) ProtoMessage() {}
|
||||
func (*CredentialMonitorRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0e30998b3c2b899e, []int{0}
|
||||
}
|
||||
|
||||
func (m *CredentialMonitorRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CredentialMonitorRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CredentialMonitorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CredentialMonitorRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CredentialMonitorRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CredentialMonitorRequest.Merge(m, src)
|
||||
}
|
||||
func (m *CredentialMonitorRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_CredentialMonitorRequest.Size(m)
|
||||
}
|
||||
func (m *CredentialMonitorRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CredentialMonitorRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CredentialMonitorRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *CredentialMonitorRequest) GetCredentialMonitor() *CredentialMonitor {
|
||||
if m != nil {
|
||||
return m.CredentialMonitor
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CredentialMonitorResponse struct {
|
||||
CredentialMonitor *CredentialMonitor `protobuf:"bytes,1,opt,name=CredentialMonitor,proto3" json:"CredentialMonitor,omitempty"`
|
||||
Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CredentialMonitorResponse) Reset() { *m = CredentialMonitorResponse{} }
|
||||
func (m *CredentialMonitorResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CredentialMonitorResponse) ProtoMessage() {}
|
||||
func (*CredentialMonitorResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0e30998b3c2b899e, []int{1}
|
||||
}
|
||||
|
||||
func (m *CredentialMonitorResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CredentialMonitorResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CredentialMonitorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CredentialMonitorResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CredentialMonitorResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CredentialMonitorResponse.Merge(m, src)
|
||||
}
|
||||
func (m *CredentialMonitorResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_CredentialMonitorResponse.Size(m)
|
||||
}
|
||||
func (m *CredentialMonitorResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CredentialMonitorResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CredentialMonitorResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *CredentialMonitorResponse) GetCredentialMonitor() *CredentialMonitor {
|
||||
if m != nil {
|
||||
return m.CredentialMonitor
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CredentialMonitorResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CredentialMonitor struct {
|
||||
Certificate []byte `protobuf:"bytes,1,opt,name=certificate,proto3" json:"certificate,omitempty"`
|
||||
Status CertificateStatus `protobuf:"varint,2,opt,name=status,proto3,enum=moc.cloudagent.admin.CertificateStatus" json:"status,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CredentialMonitor) Reset() { *m = CredentialMonitor{} }
|
||||
func (m *CredentialMonitor) String() string { return proto.CompactTextString(m) }
|
||||
func (*CredentialMonitor) ProtoMessage() {}
|
||||
func (*CredentialMonitor) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0e30998b3c2b899e, []int{2}
|
||||
}
|
||||
|
||||
func (m *CredentialMonitor) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CredentialMonitor.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CredentialMonitor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CredentialMonitor.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CredentialMonitor) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CredentialMonitor.Merge(m, src)
|
||||
}
|
||||
func (m *CredentialMonitor) XXX_Size() int {
|
||||
return xxx_messageInfo_CredentialMonitor.Size(m)
|
||||
}
|
||||
func (m *CredentialMonitor) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CredentialMonitor.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CredentialMonitor proto.InternalMessageInfo
|
||||
|
||||
func (m *CredentialMonitor) GetCertificate() []byte {
|
||||
if m != nil {
|
||||
return m.Certificate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CredentialMonitor) GetStatus() CertificateStatus {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return CertificateStatus_Single
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.cloudagent.admin.CertificateStatus", CertificateStatus_name, CertificateStatus_value)
|
||||
proto.RegisterType((*CredentialMonitorRequest)(nil), "moc.cloudagent.admin.CredentialMonitorRequest")
|
||||
proto.RegisterType((*CredentialMonitorResponse)(nil), "moc.cloudagent.admin.CredentialMonitorResponse")
|
||||
proto.RegisterType((*CredentialMonitor)(nil), "moc.cloudagent.admin.CredentialMonitor")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("credentialmonitor.proto", fileDescriptor_0e30998b3c2b899e) }
|
||||
|
||||
var fileDescriptor_0e30998b3c2b899e = []byte{
|
||||
// 292 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x92, 0xc1, 0x4a, 0x33, 0x31,
|
||||
0x10, 0xc7, 0x9b, 0xef, 0xc3, 0x8a, 0x53, 0x91, 0x36, 0x14, 0xad, 0x9e, 0xca, 0x5e, 0x2c, 0xa2,
|
||||
0x09, 0xd4, 0x07, 0x10, 0x15, 0xf1, 0x24, 0xc2, 0x16, 0x2f, 0xde, 0xd2, 0x34, 0xdd, 0x06, 0x36,
|
||||
0x99, 0x6d, 0x32, 0xdb, 0x07, 0xf0, 0xe4, 0x63, 0x8b, 0xbb, 0x62, 0x85, 0x5d, 0xa1, 0x17, 0x8f,
|
||||
0xc9, 0xcc, 0xff, 0xf7, 0x1b, 0x32, 0x81, 0x13, 0x1d, 0xcc, 0xc2, 0x78, 0xb2, 0x2a, 0x77, 0xe8,
|
||||
0x2d, 0x61, 0x10, 0x45, 0x40, 0x42, 0x3e, 0x74, 0xa8, 0x85, 0xce, 0xb1, 0x5c, 0xa8, 0xcc, 0x78,
|
||||
0x12, 0x6a, 0xe1, 0xac, 0x4f, 0xd6, 0x30, 0xba, 0xff, 0x0e, 0x3c, 0xd5, 0x81, 0xd4, 0xac, 0x4b,
|
||||
0x13, 0x89, 0xbf, 0xc0, 0xa0, 0x51, 0x1b, 0xb1, 0x31, 0x9b, 0xf4, 0xa6, 0xe7, 0xa2, 0x8d, 0x26,
|
||||
0x9a, 0xa8, 0x26, 0x21, 0x79, 0x67, 0x70, 0xda, 0xe2, 0x8c, 0x05, 0xfa, 0x68, 0xfe, 0x48, 0xca,
|
||||
0x87, 0xb0, 0xf7, 0x10, 0x02, 0x86, 0xd1, 0xbf, 0x31, 0x9b, 0x1c, 0xa4, 0xf5, 0x21, 0xd9, 0xb4,
|
||||
0xc8, 0xf8, 0x18, 0x7a, 0xda, 0x04, 0xb2, 0x4b, 0xab, 0x15, 0x99, 0xca, 0x7d, 0x98, 0xfe, 0xbc,
|
||||
0xe2, 0x37, 0xd0, 0x8d, 0xa4, 0xa8, 0x8c, 0x15, 0xed, 0xe8, 0xd7, 0xc1, 0xb6, 0x91, 0x59, 0xd5,
|
||||
0x9e, 0x7e, 0xc5, 0x2e, 0x2e, 0x61, 0xd0, 0x28, 0x72, 0x80, 0xee, 0xcc, 0xfa, 0x2c, 0x37, 0xfd,
|
||||
0x0e, 0xef, 0xc1, 0xfe, 0xf3, 0xc6, 0x84, 0x5c, 0x15, 0x7d, 0x36, 0x7d, 0x63, 0x70, 0xdc, 0x18,
|
||||
0xf3, 0xf6, 0x53, 0xc4, 0x57, 0xf0, 0xff, 0xd1, 0x10, 0x17, 0xbb, 0xbe, 0x4c, 0xbd, 0xd9, 0x33,
|
||||
0xb9, 0x73, 0x7f, 0xbd, 0x95, 0xa4, 0x73, 0x27, 0x5f, 0xaf, 0x32, 0x4b, 0xab, 0x72, 0x2e, 0x34,
|
||||
0x3a, 0xe9, 0xac, 0x0e, 0x18, 0x71, 0x49, 0xd2, 0xa1, 0x96, 0xa1, 0xd0, 0x72, 0x0b, 0x93, 0x15,
|
||||
0x6c, 0xde, 0xad, 0xbe, 0xdd, 0xf5, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff, 0x26, 0xec, 0xde, 0xc1,
|
||||
0x91, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// CredentialMonitorAgentClient is the client API for CredentialMonitorAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type CredentialMonitorAgentClient interface {
|
||||
Get(ctx context.Context, in *CredentialMonitorRequest, opts ...grpc.CallOption) (*CredentialMonitorResponse, error)
|
||||
}
|
||||
|
||||
type credentialMonitorAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewCredentialMonitorAgentClient(cc *grpc.ClientConn) CredentialMonitorAgentClient {
|
||||
return &credentialMonitorAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *credentialMonitorAgentClient) Get(ctx context.Context, in *CredentialMonitorRequest, opts ...grpc.CallOption) (*CredentialMonitorResponse, error) {
|
||||
out := new(CredentialMonitorResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.admin.CredentialMonitorAgent/Get", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// CredentialMonitorAgentServer is the server API for CredentialMonitorAgent service.
|
||||
type CredentialMonitorAgentServer interface {
|
||||
Get(context.Context, *CredentialMonitorRequest) (*CredentialMonitorResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedCredentialMonitorAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedCredentialMonitorAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedCredentialMonitorAgentServer) Get(ctx context.Context, req *CredentialMonitorRequest) (*CredentialMonitorResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
|
||||
func RegisterCredentialMonitorAgentServer(s *grpc.Server, srv CredentialMonitorAgentServer) {
|
||||
s.RegisterService(&_CredentialMonitorAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _CredentialMonitorAgent_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CredentialMonitorRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CredentialMonitorAgentServer).Get(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.admin.CredentialMonitorAgent/Get",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CredentialMonitorAgentServer).Get(ctx, req.(*CredentialMonitorRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _CredentialMonitorAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.admin.CredentialMonitorAgent",
|
||||
HandlerType: (*CredentialMonitorAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Get",
|
||||
Handler: _CredentialMonitorAgent_Get_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "credentialmonitor.proto",
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/admin";
|
||||
package moc.cloudagent.admin;
|
||||
|
||||
enum CertificateStatus {
|
||||
Single = 0;
|
||||
Overlap = 1;
|
||||
}
|
||||
|
||||
message CredentialMonitorRequest {
|
||||
CredentialMonitor CredentialMonitor = 1;
|
||||
}
|
||||
|
||||
message CredentialMonitorResponse {
|
||||
CredentialMonitor CredentialMonitor = 1;
|
||||
string Error = 2;
|
||||
}
|
||||
|
||||
message CredentialMonitor {
|
||||
bytes certificate = 1;
|
||||
CertificateStatus status = 2;
|
||||
}
|
||||
|
||||
service CredentialMonitorAgent {
|
||||
rpc Get(CredentialMonitorRequest) returns (CredentialMonitorResponse) {}
|
||||
}
|
|
@ -0,0 +1,301 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: logging.proto
|
||||
|
||||
package admin
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type GetLogType int32
|
||||
|
||||
const (
|
||||
GetLogType_All GetLogType = 0
|
||||
GetLogType_Cloud GetLogType = 1
|
||||
GetLogType_Node GetLogType = 2
|
||||
)
|
||||
|
||||
var GetLogType_name = map[int32]string{
|
||||
0: "All",
|
||||
1: "Cloud",
|
||||
2: "Node",
|
||||
}
|
||||
|
||||
var GetLogType_value = map[string]int32{
|
||||
"All": 0,
|
||||
"Cloud": 1,
|
||||
"Node": 2,
|
||||
}
|
||||
|
||||
func (x GetLogType) String() string {
|
||||
return proto.EnumName(GetLogType_name, int32(x))
|
||||
}
|
||||
|
||||
func (GetLogType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9c8ad1e4de00dd2b, []int{0}
|
||||
}
|
||||
|
||||
type LogRequest struct {
|
||||
Type GetLogType `protobuf:"varint,1,opt,name=type,proto3,enum=moc.cloudagent.admin.GetLogType" json:"type,omitempty"`
|
||||
Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LogRequest) Reset() { *m = LogRequest{} }
|
||||
func (m *LogRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LogRequest) ProtoMessage() {}
|
||||
func (*LogRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9c8ad1e4de00dd2b, []int{0}
|
||||
}
|
||||
|
||||
func (m *LogRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LogRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LogRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LogRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LogRequest.Merge(m, src)
|
||||
}
|
||||
func (m *LogRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_LogRequest.Size(m)
|
||||
}
|
||||
func (m *LogRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LogRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LogRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *LogRequest) GetType() GetLogType {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return GetLogType_All
|
||||
}
|
||||
|
||||
func (m *LogRequest) GetLocation() string {
|
||||
if m != nil {
|
||||
return m.Location
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LogFileResponse struct {
|
||||
File []byte `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
|
||||
Done bool `protobuf:"varint,2,opt,name=done,proto3" json:"done,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
|
||||
Filename string `protobuf:"bytes,4,opt,name=filename,proto3" json:"filename,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LogFileResponse) Reset() { *m = LogFileResponse{} }
|
||||
func (m *LogFileResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LogFileResponse) ProtoMessage() {}
|
||||
func (*LogFileResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_9c8ad1e4de00dd2b, []int{1}
|
||||
}
|
||||
|
||||
func (m *LogFileResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LogFileResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LogFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LogFileResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LogFileResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LogFileResponse.Merge(m, src)
|
||||
}
|
||||
func (m *LogFileResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_LogFileResponse.Size(m)
|
||||
}
|
||||
func (m *LogFileResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LogFileResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LogFileResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *LogFileResponse) GetFile() []byte {
|
||||
if m != nil {
|
||||
return m.File
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LogFileResponse) GetDone() bool {
|
||||
if m != nil {
|
||||
return m.Done
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *LogFileResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LogFileResponse) GetFilename() string {
|
||||
if m != nil {
|
||||
return m.Filename
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.cloudagent.admin.GetLogType", GetLogType_name, GetLogType_value)
|
||||
proto.RegisterType((*LogRequest)(nil), "moc.cloudagent.admin.LogRequest")
|
||||
proto.RegisterType((*LogFileResponse)(nil), "moc.cloudagent.admin.LogFileResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("logging.proto", fileDescriptor_9c8ad1e4de00dd2b) }
|
||||
|
||||
var fileDescriptor_9c8ad1e4de00dd2b = []byte{
|
||||
// 294 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xcf, 0x6a, 0x32, 0x31,
|
||||
0x14, 0xc5, 0x1d, 0x1d, 0xbf, 0x6f, 0xbc, 0xf4, 0x8f, 0x04, 0x17, 0x83, 0x2b, 0x11, 0x0a, 0x22,
|
||||
0x74, 0xa6, 0xd8, 0xbe, 0x80, 0x2d, 0xd4, 0xcd, 0xd0, 0x45, 0xe8, 0xaa, 0x0b, 0x61, 0xcc, 0x5c,
|
||||
0xd3, 0xd0, 0x24, 0x77, 0x9a, 0x89, 0x0b, 0xdf, 0xbe, 0x4c, 0xa4, 0x9d, 0x2e, 0xea, 0xee, 0x9e,
|
||||
0x70, 0xcf, 0x39, 0xf9, 0x25, 0x70, 0xa9, 0x49, 0x4a, 0x65, 0x65, 0x56, 0x3b, 0xf2, 0xc4, 0x26,
|
||||
0x86, 0x44, 0x26, 0x34, 0x1d, 0xaa, 0x52, 0xa2, 0xf5, 0x59, 0x59, 0x19, 0x65, 0xe7, 0x5b, 0x80,
|
||||
0x82, 0x24, 0xc7, 0xcf, 0x03, 0x36, 0x9e, 0x3d, 0x40, 0xec, 0x8f, 0x35, 0xa6, 0xd1, 0x2c, 0x5a,
|
||||
0x5c, 0xad, 0x66, 0xd9, 0x5f, 0x96, 0x6c, 0x83, 0xbe, 0x20, 0xf9, 0x7a, 0xac, 0x91, 0x87, 0x6d,
|
||||
0x36, 0x85, 0x44, 0x93, 0x28, 0xbd, 0x22, 0x9b, 0xf6, 0x67, 0xd1, 0x62, 0xc4, 0x7f, 0xf4, 0xfc,
|
||||
0x03, 0xae, 0x0b, 0x92, 0xcf, 0x4a, 0x23, 0xc7, 0xa6, 0x26, 0xdb, 0x20, 0x63, 0x10, 0xef, 0x95,
|
||||
0x3e, 0x95, 0x5c, 0xf0, 0x30, 0xb7, 0x67, 0x15, 0x59, 0x0c, 0xf6, 0x84, 0x87, 0x99, 0x4d, 0x60,
|
||||
0x88, 0xce, 0x91, 0x4b, 0x07, 0x21, 0xf3, 0x24, 0xda, 0xb2, 0xd6, 0x61, 0x4b, 0x83, 0x69, 0x7c,
|
||||
0x2a, 0xfb, 0xd6, 0xcb, 0x25, 0x40, 0x77, 0x39, 0xf6, 0x1f, 0x06, 0x6b, 0xad, 0xc7, 0x3d, 0x36,
|
||||
0x82, 0xe1, 0x53, 0x0b, 0x31, 0x8e, 0x58, 0x02, 0xf1, 0x0b, 0x55, 0x38, 0xee, 0xaf, 0xb6, 0x90,
|
||||
0x14, 0x24, 0xd7, 0x2d, 0x17, 0xe3, 0x30, 0xd8, 0xa0, 0x67, 0x67, 0x78, 0xbb, 0xf7, 0x99, 0xde,
|
||||
0x9c, 0xdd, 0xf8, 0x4d, 0x38, 0xef, 0xdd, 0x45, 0x8f, 0xf9, 0xdb, 0xad, 0x54, 0xfe, 0xfd, 0xb0,
|
||||
0xcb, 0x04, 0x99, 0xdc, 0x28, 0xe1, 0xa8, 0xa1, 0xbd, 0xcf, 0x0d, 0x89, 0xdc, 0xd5, 0x22, 0xef,
|
||||
0x42, 0xf2, 0x10, 0xb2, 0xfb, 0x17, 0xbe, 0xe9, 0xfe, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xea, 0x6e,
|
||||
0x33, 0x44, 0xb7, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// LogAgentClient is the client API for LogAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type LogAgentClient interface {
|
||||
Get(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (LogAgent_GetClient, error)
|
||||
}
|
||||
|
||||
type logAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewLogAgentClient(cc *grpc.ClientConn) LogAgentClient {
|
||||
return &logAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *logAgentClient) Get(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (LogAgent_GetClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_LogAgent_serviceDesc.Streams[0], "/moc.cloudagent.admin.LogAgent/Get", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &logAgentGetClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type LogAgent_GetClient interface {
|
||||
Recv() (*LogFileResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type logAgentGetClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *logAgentGetClient) Recv() (*LogFileResponse, error) {
|
||||
m := new(LogFileResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// LogAgentServer is the server API for LogAgent service.
|
||||
type LogAgentServer interface {
|
||||
Get(*LogRequest, LogAgent_GetServer) error
|
||||
}
|
||||
|
||||
// UnimplementedLogAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedLogAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedLogAgentServer) Get(req *LogRequest, srv LogAgent_GetServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
|
||||
func RegisterLogAgentServer(s *grpc.Server, srv LogAgentServer) {
|
||||
s.RegisterService(&_LogAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _LogAgent_Get_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(LogRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(LogAgentServer).Get(m, &logAgentGetServer{stream})
|
||||
}
|
||||
|
||||
type LogAgent_GetServer interface {
|
||||
Send(*LogFileResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type logAgentGetServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *logAgentGetServer) Send(m *LogFileResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
var _LogAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.admin.LogAgent",
|
||||
HandlerType: (*LogAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Get",
|
||||
Handler: _LogAgent_Get_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "logging.proto",
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/admin";
|
||||
package moc.cloudagent.admin;
|
||||
|
||||
service LogAgent {
|
||||
rpc Get(LogRequest) returns (stream LogFileResponse) {}
|
||||
}
|
||||
|
||||
enum GetLogType {
|
||||
All = 0;
|
||||
Cloud = 1;
|
||||
Node = 2;
|
||||
}
|
||||
|
||||
message LogRequest {
|
||||
GetLogType type = 1;
|
||||
string location = 2;
|
||||
}
|
||||
|
||||
message LogFileResponse {
|
||||
bytes file = 1;
|
||||
bool done = 2;
|
||||
string error = 3;
|
||||
string filename = 4;
|
||||
}
|
|
@ -0,0 +1,412 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: cluster.proto
|
||||
|
||||
package cloud
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type ClusterResponse struct {
|
||||
Clusters []*Cluster `protobuf:"bytes,1,rep,name=Clusters,proto3" json:"Clusters,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ClusterResponse) Reset() { *m = ClusterResponse{} }
|
||||
func (m *ClusterResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ClusterResponse) ProtoMessage() {}
|
||||
func (*ClusterResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_3cfb3b8ec240c376, []int{0}
|
||||
}
|
||||
|
||||
func (m *ClusterResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ClusterResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ClusterResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ClusterResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ClusterResponse.Merge(m, src)
|
||||
}
|
||||
func (m *ClusterResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_ClusterResponse.Size(m)
|
||||
}
|
||||
func (m *ClusterResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ClusterResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ClusterResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *ClusterResponse) GetClusters() []*Cluster {
|
||||
if m != nil {
|
||||
return m.Clusters
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ClusterResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ClusterResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Cluster struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Fqdn string `protobuf:"bytes,3,opt,name=fqdn,proto3" json:"fqdn,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
|
||||
UserOwned bool `protobuf:"varint,5,opt,name=UserOwned,proto3" json:"UserOwned,omitempty"`
|
||||
IsLocalCluster bool `protobuf:"varint,6,opt,name=IsLocalCluster,proto3" json:"IsLocalCluster,omitempty"`
|
||||
Domain string `protobuf:"bytes,7,opt,name=domain,proto3" json:"domain,omitempty"`
|
||||
Nodes []*Node `protobuf:"bytes,8,rep,name=Nodes,proto3" json:"Nodes,omitempty"`
|
||||
LocationName string `protobuf:"bytes,9,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Cluster) Reset() { *m = Cluster{} }
|
||||
func (m *Cluster) String() string { return proto.CompactTextString(m) }
|
||||
func (*Cluster) ProtoMessage() {}
|
||||
func (*Cluster) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_3cfb3b8ec240c376, []int{1}
|
||||
}
|
||||
|
||||
func (m *Cluster) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Cluster.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Cluster.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Cluster) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Cluster.Merge(m, src)
|
||||
}
|
||||
func (m *Cluster) XXX_Size() int {
|
||||
return xxx_messageInfo_Cluster.Size(m)
|
||||
}
|
||||
func (m *Cluster) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Cluster.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Cluster proto.InternalMessageInfo
|
||||
|
||||
func (m *Cluster) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Cluster) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Cluster) GetFqdn() string {
|
||||
if m != nil {
|
||||
return m.Fqdn
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Cluster) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Cluster) GetUserOwned() bool {
|
||||
if m != nil {
|
||||
return m.UserOwned
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *Cluster) GetIsLocalCluster() bool {
|
||||
if m != nil {
|
||||
return m.IsLocalCluster
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *Cluster) GetDomain() string {
|
||||
if m != nil {
|
||||
return m.Domain
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Cluster) GetNodes() []*Node {
|
||||
if m != nil {
|
||||
return m.Nodes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Cluster) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ClusterResponse)(nil), "moc.cloudagent.cluster.ClusterResponse")
|
||||
proto.RegisterType((*Cluster)(nil), "moc.cloudagent.cluster.Cluster")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("cluster.proto", fileDescriptor_3cfb3b8ec240c376) }
|
||||
|
||||
var fileDescriptor_3cfb3b8ec240c376 = []byte{
|
||||
// 435 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x52, 0x4d, 0x6f, 0x13, 0x31,
|
||||
0x10, 0x65, 0xb7, 0xcd, 0x36, 0x99, 0xa4, 0x45, 0xb2, 0x50, 0x65, 0x22, 0x04, 0x21, 0x48, 0x90,
|
||||
0x0b, 0x5e, 0x29, 0x1c, 0x39, 0x51, 0x84, 0x2a, 0xa4, 0xaa, 0xa0, 0x45, 0x45, 0x7c, 0x9c, 0x1c,
|
||||
0xdb, 0x09, 0x2b, 0x79, 0x3d, 0x8b, 0xed, 0x55, 0xff, 0x0a, 0xfc, 0x4d, 0x7e, 0x01, 0x5a, 0xdb,
|
||||
0x69, 0x45, 0x45, 0x95, 0x53, 0x6f, 0x33, 0xcf, 0x6f, 0xde, 0x3c, 0xcf, 0x0c, 0x1c, 0x0a, 0xdd,
|
||||
0x39, 0xaf, 0x2c, 0x6b, 0x2d, 0x7a, 0x24, 0xc7, 0x0d, 0x0a, 0x26, 0x34, 0x76, 0x92, 0x6f, 0x94,
|
||||
0xf1, 0x2c, 0xbd, 0x4e, 0x1f, 0x6f, 0x10, 0x37, 0x5a, 0x95, 0x81, 0xb5, 0xea, 0xd6, 0xe5, 0xa5,
|
||||
0xe5, 0x6d, 0xab, 0xac, 0x8b, 0x75, 0xd3, 0x89, 0xc0, 0xa6, 0x41, 0x93, 0x32, 0x30, 0x28, 0x55,
|
||||
0x8c, 0xe7, 0xbf, 0x32, 0xb8, 0xff, 0x36, 0xaa, 0x54, 0xca, 0xb5, 0x68, 0x9c, 0x22, 0xaf, 0x61,
|
||||
0x98, 0x20, 0x47, 0xb3, 0xd9, 0xde, 0x62, 0xbc, 0x7c, 0xc2, 0xfe, 0xdf, 0x98, 0x6d, 0x4b, 0xaf,
|
||||
0x0a, 0xc8, 0x12, 0x8a, 0x4a, 0xb9, 0x4e, 0x7b, 0x9a, 0xcf, 0xb2, 0xc5, 0x78, 0x39, 0x65, 0xd1,
|
||||
0x1b, 0xdb, 0x7a, 0x63, 0x27, 0x88, 0xfa, 0x33, 0xd7, 0x9d, 0xaa, 0x12, 0x93, 0x3c, 0x80, 0xc1,
|
||||
0x3b, 0x6b, 0xd1, 0xd2, 0xbd, 0x59, 0xb6, 0x18, 0x55, 0x31, 0x99, 0xff, 0xce, 0xe1, 0x20, 0xc9,
|
||||
0x12, 0x02, 0xfb, 0x86, 0x37, 0x8a, 0x66, 0x81, 0x10, 0x62, 0x72, 0x04, 0x79, 0x2d, 0x43, 0x97,
|
||||
0x51, 0x95, 0xd7, 0xb2, 0xe7, 0xac, 0x7f, 0x4a, 0x93, 0x44, 0x42, 0x4c, 0x9e, 0x41, 0xe1, 0x3c,
|
||||
0xf7, 0x9d, 0xa3, 0xfb, 0xc1, 0xcd, 0x38, 0x7c, 0xe4, 0x53, 0x80, 0xaa, 0xf4, 0x44, 0x1e, 0xc1,
|
||||
0xe8, 0xc2, 0x29, 0xfb, 0xe1, 0xd2, 0x28, 0x49, 0x07, 0xb3, 0x6c, 0x31, 0xac, 0xae, 0x01, 0xf2,
|
||||
0x1c, 0x8e, 0xde, 0xbb, 0x33, 0x14, 0x5c, 0x27, 0x33, 0xb4, 0x08, 0x94, 0x1b, 0x28, 0x39, 0x86,
|
||||
0x42, 0x62, 0xc3, 0x6b, 0x43, 0x0f, 0x82, 0x81, 0x94, 0x91, 0x12, 0x06, 0xe7, 0x28, 0x95, 0xa3,
|
||||
0xc3, 0x30, 0xca, 0x87, 0x37, 0x47, 0x19, 0x96, 0xd1, 0x33, 0xaa, 0xc8, 0x23, 0x73, 0x98, 0x68,
|
||||
0x14, 0xdc, 0xd7, 0x68, 0xce, 0xfb, 0x3f, 0x8f, 0x82, 0xdc, 0x3f, 0xd8, 0xf2, 0x4f, 0x0e, 0x93,
|
||||
0xd4, 0xf8, 0x4d, 0xaf, 0x42, 0xbe, 0xc2, 0xf8, 0x0c, 0xb9, 0xdc, 0x9a, 0xd9, 0xb5, 0xb0, 0xe9,
|
||||
0x8b, 0x5d, 0x1b, 0x4d, 0xc7, 0x30, 0xbf, 0x47, 0xbe, 0xc3, 0xe1, 0x85, 0xd1, 0x77, 0x24, 0xfe,
|
||||
0x05, 0xe0, 0x54, 0xf9, 0xbb, 0x50, 0xfe, 0x08, 0xc3, 0x53, 0xe5, 0xe3, 0x48, 0x77, 0xea, 0x3e,
|
||||
0xbd, 0x7d, 0x2b, 0x57, 0x8a, 0x27, 0xe5, 0xb7, 0x97, 0x9b, 0xda, 0xff, 0xe8, 0x56, 0x4c, 0x60,
|
||||
0x53, 0x36, 0xb5, 0xb0, 0xe8, 0x70, 0xed, 0xcb, 0x06, 0x45, 0x69, 0x5b, 0x51, 0x5e, 0x97, 0xc7,
|
||||
0x70, 0x55, 0x84, 0x9b, 0x7f, 0xf5, 0x37, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x29, 0x26, 0x65, 0xc6,
|
||||
0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// ClusterAgentClient is the client API for ClusterAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type ClusterAgentClient interface {
|
||||
LoadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error)
|
||||
UnloadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error)
|
||||
GetCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error)
|
||||
GetNodes(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*NodeResponse, error)
|
||||
}
|
||||
|
||||
type clusterAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewClusterAgentClient(cc *grpc.ClientConn) ClusterAgentClient {
|
||||
return &clusterAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *clusterAgentClient) LoadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) {
|
||||
out := new(ClusterResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/LoadCluster", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *clusterAgentClient) UnloadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) {
|
||||
out := new(ClusterResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/UnloadCluster", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *clusterAgentClient) GetCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) {
|
||||
out := new(ClusterResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/GetCluster", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *clusterAgentClient) GetNodes(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*NodeResponse, error) {
|
||||
out := new(NodeResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/GetNodes", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ClusterAgentServer is the server API for ClusterAgent service.
|
||||
type ClusterAgentServer interface {
|
||||
LoadCluster(context.Context, *Cluster) (*ClusterResponse, error)
|
||||
UnloadCluster(context.Context, *Cluster) (*ClusterResponse, error)
|
||||
GetCluster(context.Context, *Cluster) (*ClusterResponse, error)
|
||||
GetNodes(context.Context, *Cluster) (*NodeResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedClusterAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedClusterAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedClusterAgentServer) LoadCluster(ctx context.Context, req *Cluster) (*ClusterResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LoadCluster not implemented")
|
||||
}
|
||||
func (*UnimplementedClusterAgentServer) UnloadCluster(ctx context.Context, req *Cluster) (*ClusterResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UnloadCluster not implemented")
|
||||
}
|
||||
func (*UnimplementedClusterAgentServer) GetCluster(ctx context.Context, req *Cluster) (*ClusterResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetCluster not implemented")
|
||||
}
|
||||
func (*UnimplementedClusterAgentServer) GetNodes(ctx context.Context, req *Cluster) (*NodeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetNodes not implemented")
|
||||
}
|
||||
|
||||
func RegisterClusterAgentServer(s *grpc.Server, srv ClusterAgentServer) {
|
||||
s.RegisterService(&_ClusterAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _ClusterAgent_LoadCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Cluster)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ClusterAgentServer).LoadCluster(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.cluster.ClusterAgent/LoadCluster",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ClusterAgentServer).LoadCluster(ctx, req.(*Cluster))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ClusterAgent_UnloadCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Cluster)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ClusterAgentServer).UnloadCluster(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.cluster.ClusterAgent/UnloadCluster",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ClusterAgentServer).UnloadCluster(ctx, req.(*Cluster))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ClusterAgent_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Cluster)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ClusterAgentServer).GetCluster(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.cluster.ClusterAgent/GetCluster",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ClusterAgentServer).GetCluster(ctx, req.(*Cluster))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ClusterAgent_GetNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Cluster)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ClusterAgentServer).GetNodes(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.cluster.ClusterAgent/GetNodes",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ClusterAgentServer).GetNodes(ctx, req.(*Cluster))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _ClusterAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.cluster.ClusterAgent",
|
||||
HandlerType: (*ClusterAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "LoadCluster",
|
||||
Handler: _ClusterAgent_LoadCluster_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UnloadCluster",
|
||||
Handler: _ClusterAgent_UnloadCluster_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetCluster",
|
||||
Handler: _ClusterAgent_GetCluster_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetNodes",
|
||||
Handler: _ClusterAgent_GetNodes_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cluster.proto",
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/cloud";
|
||||
package moc.cloudagent.cluster;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
import "node.proto";
|
||||
|
||||
message ClusterResponse {
|
||||
repeated Cluster Clusters = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message Cluster {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
string fqdn = 3;
|
||||
Status status = 4;
|
||||
bool UserOwned = 5;
|
||||
bool IsLocalCluster = 6;
|
||||
string domain = 7;
|
||||
repeated moc.cloudagent.node.Node Nodes = 8;
|
||||
string locationName = 9;
|
||||
}
|
||||
|
||||
|
||||
service ClusterAgent {
|
||||
rpc LoadCluster(Cluster) returns (ClusterResponse) {}
|
||||
rpc UnloadCluster(Cluster) returns (ClusterResponse) {}
|
||||
rpc GetCluster(Cluster) returns (ClusterResponse) {}
|
||||
rpc GetNodes(Cluster) returns (moc.cloudagent.node.NodeResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,347 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: group.proto
|
||||
|
||||
package cloud
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type SubPostOperation int32
|
||||
|
||||
const (
|
||||
SubPostOperation_CREATE SubPostOperation = 0
|
||||
SubPostOperation_UPDATE SubPostOperation = 1
|
||||
SubPostOperation_LOCK SubPostOperation = 2
|
||||
)
|
||||
|
||||
var SubPostOperation_name = map[int32]string{
|
||||
0: "CREATE",
|
||||
1: "UPDATE",
|
||||
2: "LOCK",
|
||||
}
|
||||
|
||||
var SubPostOperation_value = map[string]int32{
|
||||
"CREATE": 0,
|
||||
"UPDATE": 1,
|
||||
"LOCK": 2,
|
||||
}
|
||||
|
||||
func (x SubPostOperation) String() string {
|
||||
return proto.EnumName(SubPostOperation_name, int32(x))
|
||||
}
|
||||
|
||||
func (SubPostOperation) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e10f4c9b19ad8eee, []int{0}
|
||||
}
|
||||
|
||||
type GroupRequest struct {
|
||||
Groups []*Group `protobuf:"bytes,1,rep,name=Groups,proto3" json:"Groups,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
PostOperationType SubPostOperation `protobuf:"varint,3,opt,name=PostOperationType,proto3,enum=moc.cloudagent.group.SubPostOperation" json:"PostOperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GroupRequest) Reset() { *m = GroupRequest{} }
|
||||
func (m *GroupRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupRequest) ProtoMessage() {}
|
||||
func (*GroupRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e10f4c9b19ad8eee, []int{0}
|
||||
}
|
||||
|
||||
func (m *GroupRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GroupRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *GroupRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GroupRequest.Merge(m, src)
|
||||
}
|
||||
func (m *GroupRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_GroupRequest.Size(m)
|
||||
}
|
||||
func (m *GroupRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GroupRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GroupRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *GroupRequest) GetGroups() []*Group {
|
||||
if m != nil {
|
||||
return m.Groups
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GroupRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
func (m *GroupRequest) GetPostOperationType() SubPostOperation {
|
||||
if m != nil {
|
||||
return m.PostOperationType
|
||||
}
|
||||
return SubPostOperation_CREATE
|
||||
}
|
||||
|
||||
type GroupResponse struct {
|
||||
Groups []*Group `protobuf:"bytes,1,rep,name=Groups,proto3" json:"Groups,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GroupResponse) Reset() { *m = GroupResponse{} }
|
||||
func (m *GroupResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupResponse) ProtoMessage() {}
|
||||
func (*GroupResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e10f4c9b19ad8eee, []int{1}
|
||||
}
|
||||
|
||||
func (m *GroupResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GroupResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *GroupResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GroupResponse.Merge(m, src)
|
||||
}
|
||||
func (m *GroupResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_GroupResponse.Size(m)
|
||||
}
|
||||
func (m *GroupResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GroupResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GroupResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *GroupResponse) GetGroups() []*Group {
|
||||
if m != nil {
|
||||
return m.Groups
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GroupResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GroupResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Group struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
|
||||
LocationName string `protobuf:"bytes,4,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Group) Reset() { *m = Group{} }
|
||||
func (m *Group) String() string { return proto.CompactTextString(m) }
|
||||
func (*Group) ProtoMessage() {}
|
||||
func (*Group) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e10f4c9b19ad8eee, []int{2}
|
||||
}
|
||||
|
||||
func (m *Group) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Group.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Group.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Group) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Group.Merge(m, src)
|
||||
}
|
||||
func (m *Group) XXX_Size() int {
|
||||
return xxx_messageInfo_Group.Size(m)
|
||||
}
|
||||
func (m *Group) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Group.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Group proto.InternalMessageInfo
|
||||
|
||||
func (m *Group) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Group) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Group) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Group) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.cloudagent.group.SubPostOperation", SubPostOperation_name, SubPostOperation_value)
|
||||
proto.RegisterType((*GroupRequest)(nil), "moc.cloudagent.group.GroupRequest")
|
||||
proto.RegisterType((*GroupResponse)(nil), "moc.cloudagent.group.GroupResponse")
|
||||
proto.RegisterType((*Group)(nil), "moc.cloudagent.group.Group")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("group.proto", fileDescriptor_e10f4c9b19ad8eee) }
|
||||
|
||||
var fileDescriptor_e10f4c9b19ad8eee = []byte{
|
||||
// 408 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0x5d, 0x6b, 0xd4, 0x40,
|
||||
0x14, 0x6d, 0xb6, 0xdb, 0x60, 0x6f, 0xb6, 0xcb, 0x3a, 0xf4, 0x61, 0x59, 0x41, 0x4a, 0x0a, 0x52,
|
||||
0x04, 0x27, 0x90, 0xf6, 0x0f, 0xb4, 0x75, 0x11, 0x51, 0x6c, 0x99, 0x5d, 0x7d, 0xf0, 0x2d, 0x3b,
|
||||
0x3b, 0x8d, 0xc1, 0x24, 0x77, 0x9c, 0x0f, 0xc5, 0x3f, 0xe1, 0x5f, 0xf3, 0x2f, 0x49, 0xee, 0x44,
|
||||
0x25, 0x5a, 0xf6, 0xa1, 0x6f, 0xf7, 0xce, 0x3d, 0xe7, 0xdc, 0x7b, 0x4e, 0x02, 0x49, 0x69, 0xd0,
|
||||
0x6b, 0xae, 0x0d, 0x3a, 0x64, 0xc7, 0x0d, 0x4a, 0x2e, 0x6b, 0xf4, 0xdb, 0xa2, 0x54, 0xad, 0xe3,
|
||||
0x34, 0x5b, 0x3c, 0x2d, 0x11, 0xcb, 0x5a, 0x65, 0x84, 0xd9, 0xf8, 0xbb, 0xec, 0x9b, 0x29, 0xb4,
|
||||
0x56, 0xc6, 0x06, 0xd6, 0x62, 0x22, 0xb1, 0x69, 0xb0, 0x0d, 0x5d, 0xfa, 0x33, 0x82, 0xc9, 0xab,
|
||||
0x8e, 0x27, 0xd4, 0x17, 0xaf, 0xac, 0x63, 0xe7, 0x10, 0x53, 0x6f, 0xe7, 0xd1, 0xc9, 0xfe, 0x59,
|
||||
0x92, 0x3f, 0xe1, 0xf7, 0x6d, 0xe1, 0x81, 0xd3, 0x43, 0xd9, 0x05, 0x1c, 0xdd, 0x68, 0x65, 0x0a,
|
||||
0x57, 0x61, 0xbb, 0xfe, 0xae, 0xd5, 0x7c, 0x74, 0x12, 0x9d, 0x4d, 0xf3, 0x29, 0x71, 0xff, 0x4c,
|
||||
0xc4, 0x10, 0xc4, 0xd6, 0xf0, 0xf8, 0x16, 0xad, 0x1b, 0x32, 0xf7, 0x89, 0xf9, 0xec, 0xfe, 0xad,
|
||||
0x2b, 0xbf, 0x19, 0x30, 0xc4, 0xff, 0x02, 0xe9, 0x8f, 0x08, 0x8e, 0x7a, 0x47, 0x56, 0x63, 0x6b,
|
||||
0xd5, 0xc3, 0x2c, 0xe5, 0x10, 0x0b, 0x65, 0x7d, 0xed, 0xc8, 0x4b, 0x92, 0x2f, 0x78, 0xc8, 0x95,
|
||||
0xff, 0xce, 0x95, 0x5f, 0x21, 0xd6, 0x1f, 0x8a, 0xda, 0x2b, 0xd1, 0x23, 0xd9, 0x31, 0x1c, 0x2c,
|
||||
0x8d, 0x41, 0x43, 0x26, 0x0e, 0x45, 0x68, 0x52, 0x07, 0x07, 0xa4, 0xc9, 0x18, 0x8c, 0xdb, 0xa2,
|
||||
0x51, 0xf3, 0x88, 0xa6, 0x54, 0xb3, 0x29, 0x8c, 0xaa, 0x2d, 0xad, 0x38, 0x14, 0xa3, 0x6a, 0xcb,
|
||||
0x4e, 0x21, 0xb6, 0xae, 0x70, 0xde, 0x92, 0x46, 0x92, 0x27, 0x74, 0xeb, 0x8a, 0x9e, 0x44, 0x3f,
|
||||
0x62, 0x29, 0x4c, 0x6a, 0x94, 0x64, 0xf9, 0x5d, 0x27, 0x38, 0x26, 0xfa, 0xe0, 0xed, 0xf9, 0x05,
|
||||
0xcc, 0xfe, 0x4d, 0x8b, 0x01, 0xc4, 0xd7, 0x62, 0x79, 0xb9, 0x5e, 0xce, 0xf6, 0xba, 0xfa, 0xfd,
|
||||
0xed, 0xcb, 0xae, 0x8e, 0xd8, 0x23, 0x18, 0xbf, 0xbd, 0xb9, 0x7e, 0x33, 0x1b, 0xe5, 0x05, 0x00,
|
||||
0xdd, 0x7a, 0xd9, 0xe5, 0xc2, 0x56, 0x10, 0xbf, 0x6e, 0xbf, 0xe2, 0x67, 0xc5, 0xd2, 0x5d, 0x91,
|
||||
0x85, 0x3f, 0x67, 0x71, 0xba, 0x13, 0x13, 0xbe, 0x45, 0xba, 0x77, 0x95, 0x7d, 0x7c, 0x51, 0x56,
|
||||
0xee, 0x93, 0xdf, 0x70, 0x89, 0x4d, 0xd6, 0x54, 0xd2, 0xa0, 0xc5, 0x3b, 0x97, 0x35, 0x28, 0x33,
|
||||
0xa3, 0x65, 0xf6, 0x57, 0x20, 0x94, 0x9b, 0x98, 0x12, 0x3f, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff,
|
||||
0x86, 0x50, 0x90, 0x1a, 0xfc, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// GroupAgentClient is the client API for GroupAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type GroupAgentClient interface {
|
||||
Invoke(ctx context.Context, in *GroupRequest, opts ...grpc.CallOption) (*GroupResponse, error)
|
||||
}
|
||||
|
||||
type groupAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewGroupAgentClient(cc *grpc.ClientConn) GroupAgentClient {
|
||||
return &groupAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *groupAgentClient) Invoke(ctx context.Context, in *GroupRequest, opts ...grpc.CallOption) (*GroupResponse, error) {
|
||||
out := new(GroupResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.group.GroupAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// GroupAgentServer is the server API for GroupAgent service.
|
||||
type GroupAgentServer interface {
|
||||
Invoke(context.Context, *GroupRequest) (*GroupResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedGroupAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedGroupAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedGroupAgentServer) Invoke(ctx context.Context, req *GroupRequest) (*GroupResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterGroupAgentServer(s *grpc.Server, srv GroupAgentServer) {
|
||||
s.RegisterService(&_GroupAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _GroupAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GroupRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GroupAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.group.GroupAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GroupAgentServer).Invoke(ctx, req.(*GroupRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _GroupAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.group.GroupAgent",
|
||||
HandlerType: (*GroupAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _GroupAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "group.proto",
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/cloud";
|
||||
package moc.cloudagent.group;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
enum SubPostOperation {
|
||||
CREATE = 0;
|
||||
UPDATE = 1;
|
||||
LOCK = 2;
|
||||
}
|
||||
|
||||
message GroupRequest {
|
||||
repeated Group Groups = 1;
|
||||
Operation OperationType = 2;
|
||||
SubPostOperation PostOperationType = 3;
|
||||
}
|
||||
|
||||
message GroupResponse {
|
||||
repeated Group Groups = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message Group {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
Status status = 3;
|
||||
string locationName = 4;
|
||||
}
|
||||
|
||||
service GroupAgent {
|
||||
rpc Invoke(GroupRequest) returns (GroupResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,946 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: kubernetes.proto
|
||||
|
||||
package cloud
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type NodeType int32
|
||||
|
||||
const (
|
||||
NodeType_ControlPlane NodeType = 0
|
||||
NodeType_LinuxWorker NodeType = 1
|
||||
NodeType_WindowsWorker NodeType = 2
|
||||
NodeType_LoadBalancer NodeType = 3
|
||||
)
|
||||
|
||||
var NodeType_name = map[int32]string{
|
||||
0: "ControlPlane",
|
||||
1: "LinuxWorker",
|
||||
2: "WindowsWorker",
|
||||
3: "LoadBalancer",
|
||||
}
|
||||
|
||||
var NodeType_value = map[string]int32{
|
||||
"ControlPlane": 0,
|
||||
"LinuxWorker": 1,
|
||||
"WindowsWorker": 2,
|
||||
"LoadBalancer": 3,
|
||||
}
|
||||
|
||||
func (x NodeType) String() string {
|
||||
return proto.EnumName(NodeType_name, int32(x))
|
||||
}
|
||||
|
||||
func (NodeType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{0}
|
||||
}
|
||||
|
||||
type ManagementStrategyType int32
|
||||
|
||||
const (
|
||||
ManagementStrategyType_Pivoted ManagementStrategyType = 0
|
||||
ManagementStrategyType_Distinct ManagementStrategyType = 1
|
||||
)
|
||||
|
||||
var ManagementStrategyType_name = map[int32]string{
|
||||
0: "Pivoted",
|
||||
1: "Distinct",
|
||||
}
|
||||
|
||||
var ManagementStrategyType_value = map[string]int32{
|
||||
"Pivoted": 0,
|
||||
"Distinct": 1,
|
||||
}
|
||||
|
||||
func (x ManagementStrategyType) String() string {
|
||||
return proto.EnumName(ManagementStrategyType_name, int32(x))
|
||||
}
|
||||
|
||||
func (ManagementStrategyType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{1}
|
||||
}
|
||||
|
||||
type KubernetesRequest struct {
|
||||
Kubernetess []*Kubernetes `protobuf:"bytes,1,rep,name=Kubernetess,proto3" json:"Kubernetess,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *KubernetesRequest) Reset() { *m = KubernetesRequest{} }
|
||||
func (m *KubernetesRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*KubernetesRequest) ProtoMessage() {}
|
||||
func (*KubernetesRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{0}
|
||||
}
|
||||
|
||||
func (m *KubernetesRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KubernetesRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *KubernetesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_KubernetesRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *KubernetesRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_KubernetesRequest.Merge(m, src)
|
||||
}
|
||||
func (m *KubernetesRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_KubernetesRequest.Size(m)
|
||||
}
|
||||
func (m *KubernetesRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_KubernetesRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_KubernetesRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *KubernetesRequest) GetKubernetess() []*Kubernetes {
|
||||
if m != nil {
|
||||
return m.Kubernetess
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KubernetesRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type KubernetesResponse struct {
|
||||
Kubernetess []*Kubernetes `protobuf:"bytes,1,rep,name=Kubernetess,proto3" json:"Kubernetess,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *KubernetesResponse) Reset() { *m = KubernetesResponse{} }
|
||||
func (m *KubernetesResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*KubernetesResponse) ProtoMessage() {}
|
||||
func (*KubernetesResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{1}
|
||||
}
|
||||
|
||||
func (m *KubernetesResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KubernetesResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *KubernetesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_KubernetesResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *KubernetesResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_KubernetesResponse.Merge(m, src)
|
||||
}
|
||||
func (m *KubernetesResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_KubernetesResponse.Size(m)
|
||||
}
|
||||
func (m *KubernetesResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_KubernetesResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_KubernetesResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *KubernetesResponse) GetKubernetess() []*Kubernetes {
|
||||
if m != nil {
|
||||
return m.Kubernetess
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KubernetesResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KubernetesResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type StorageConfiguration struct {
|
||||
Csi string `protobuf:"bytes,1,opt,name=csi,proto3" json:"csi,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *StorageConfiguration) Reset() { *m = StorageConfiguration{} }
|
||||
func (m *StorageConfiguration) String() string { return proto.CompactTextString(m) }
|
||||
func (*StorageConfiguration) ProtoMessage() {}
|
||||
func (*StorageConfiguration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{2}
|
||||
}
|
||||
|
||||
func (m *StorageConfiguration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_StorageConfiguration.Unmarshal(m, b)
|
||||
}
|
||||
func (m *StorageConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_StorageConfiguration.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *StorageConfiguration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_StorageConfiguration.Merge(m, src)
|
||||
}
|
||||
func (m *StorageConfiguration) XXX_Size() int {
|
||||
return xxx_messageInfo_StorageConfiguration.Size(m)
|
||||
}
|
||||
func (m *StorageConfiguration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_StorageConfiguration.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_StorageConfiguration proto.InternalMessageInfo
|
||||
|
||||
func (m *StorageConfiguration) GetCsi() string {
|
||||
if m != nil {
|
||||
return m.Csi
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type NetworkConfiguration struct {
|
||||
Cni string `protobuf:"bytes,1,opt,name=cni,proto3" json:"cni,omitempty"`
|
||||
PodCidr string `protobuf:"bytes,2,opt,name=podCidr,proto3" json:"podCidr,omitempty"`
|
||||
ClusterCidr string `protobuf:"bytes,3,opt,name=clusterCidr,proto3" json:"clusterCidr,omitempty"`
|
||||
// TODO: merge controlplane cidr and network
|
||||
ControlPlaneCidr string `protobuf:"bytes,4,opt,name=controlPlaneCidr,proto3" json:"controlPlaneCidr,omitempty"`
|
||||
Virtualnetwork string `protobuf:"bytes,5,opt,name=virtualnetwork,proto3" json:"virtualnetwork,omitempty"`
|
||||
LoadBalancerVip string `protobuf:"bytes,6,opt,name=loadBalancerVip,proto3" json:"loadBalancerVip,omitempty"`
|
||||
LoadBalancerMac string `protobuf:"bytes,7,opt,name=loadBalancerMac,proto3" json:"loadBalancerMac,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NetworkConfiguration) Reset() { *m = NetworkConfiguration{} }
|
||||
func (m *NetworkConfiguration) String() string { return proto.CompactTextString(m) }
|
||||
func (*NetworkConfiguration) ProtoMessage() {}
|
||||
func (*NetworkConfiguration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{3}
|
||||
}
|
||||
|
||||
func (m *NetworkConfiguration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NetworkConfiguration.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NetworkConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NetworkConfiguration.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NetworkConfiguration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NetworkConfiguration.Merge(m, src)
|
||||
}
|
||||
func (m *NetworkConfiguration) XXX_Size() int {
|
||||
return xxx_messageInfo_NetworkConfiguration.Size(m)
|
||||
}
|
||||
func (m *NetworkConfiguration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NetworkConfiguration.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NetworkConfiguration proto.InternalMessageInfo
|
||||
|
||||
func (m *NetworkConfiguration) GetCni() string {
|
||||
if m != nil {
|
||||
return m.Cni
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkConfiguration) GetPodCidr() string {
|
||||
if m != nil {
|
||||
return m.PodCidr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkConfiguration) GetClusterCidr() string {
|
||||
if m != nil {
|
||||
return m.ClusterCidr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkConfiguration) GetControlPlaneCidr() string {
|
||||
if m != nil {
|
||||
return m.ControlPlaneCidr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkConfiguration) GetVirtualnetwork() string {
|
||||
if m != nil {
|
||||
return m.Virtualnetwork
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkConfiguration) GetLoadBalancerVip() string {
|
||||
if m != nil {
|
||||
return m.LoadBalancerVip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkConfiguration) GetLoadBalancerMac() string {
|
||||
if m != nil {
|
||||
return m.LoadBalancerMac
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type NodePoolConfiguration struct {
|
||||
NodeType NodeType `protobuf:"varint,1,opt,name=NodeType,proto3,enum=moc.cloudagent.kubernetes.NodeType" json:"NodeType,omitempty"`
|
||||
Imagereference string `protobuf:"bytes,2,opt,name=imagereference,proto3" json:"imagereference,omitempty"`
|
||||
Replicas int32 `protobuf:"varint,3,opt,name=replicas,proto3" json:"replicas,omitempty"`
|
||||
VMSize string `protobuf:"bytes,4,opt,name=VMSize,proto3" json:"VMSize,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NodePoolConfiguration) Reset() { *m = NodePoolConfiguration{} }
|
||||
func (m *NodePoolConfiguration) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodePoolConfiguration) ProtoMessage() {}
|
||||
func (*NodePoolConfiguration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{4}
|
||||
}
|
||||
|
||||
func (m *NodePoolConfiguration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NodePoolConfiguration.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NodePoolConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NodePoolConfiguration.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NodePoolConfiguration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NodePoolConfiguration.Merge(m, src)
|
||||
}
|
||||
func (m *NodePoolConfiguration) XXX_Size() int {
|
||||
return xxx_messageInfo_NodePoolConfiguration.Size(m)
|
||||
}
|
||||
func (m *NodePoolConfiguration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NodePoolConfiguration.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NodePoolConfiguration proto.InternalMessageInfo
|
||||
|
||||
func (m *NodePoolConfiguration) GetNodeType() NodeType {
|
||||
if m != nil {
|
||||
return m.NodeType
|
||||
}
|
||||
return NodeType_ControlPlane
|
||||
}
|
||||
|
||||
func (m *NodePoolConfiguration) GetImagereference() string {
|
||||
if m != nil {
|
||||
return m.Imagereference
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NodePoolConfiguration) GetReplicas() int32 {
|
||||
if m != nil {
|
||||
return m.Replicas
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *NodePoolConfiguration) GetVMSize() string {
|
||||
if m != nil {
|
||||
return m.VMSize
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SSHPublicKey struct {
|
||||
KeyData string `protobuf:"bytes,1,opt,name=keyData,proto3" json:"keyData,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SSHPublicKey) Reset() { *m = SSHPublicKey{} }
|
||||
func (m *SSHPublicKey) String() string { return proto.CompactTextString(m) }
|
||||
func (*SSHPublicKey) ProtoMessage() {}
|
||||
func (*SSHPublicKey) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{5}
|
||||
}
|
||||
|
||||
func (m *SSHPublicKey) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SSHPublicKey.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SSHPublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SSHPublicKey.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SSHPublicKey) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SSHPublicKey.Merge(m, src)
|
||||
}
|
||||
func (m *SSHPublicKey) XXX_Size() int {
|
||||
return xxx_messageInfo_SSHPublicKey.Size(m)
|
||||
}
|
||||
func (m *SSHPublicKey) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SSHPublicKey.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SSHPublicKey proto.InternalMessageInfo
|
||||
|
||||
func (m *SSHPublicKey) GetKeyData() string {
|
||||
if m != nil {
|
||||
return m.KeyData
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ComputeConfiguration struct {
|
||||
Cri string `protobuf:"bytes,1,opt,name=cri,proto3" json:"cri,omitempty"`
|
||||
PublicKey *SSHPublicKey `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"`
|
||||
NodePools []*NodePoolConfiguration `protobuf:"bytes,3,rep,name=NodePools,proto3" json:"NodePools,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ComputeConfiguration) Reset() { *m = ComputeConfiguration{} }
|
||||
func (m *ComputeConfiguration) String() string { return proto.CompactTextString(m) }
|
||||
func (*ComputeConfiguration) ProtoMessage() {}
|
||||
func (*ComputeConfiguration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{6}
|
||||
}
|
||||
|
||||
func (m *ComputeConfiguration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ComputeConfiguration.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ComputeConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ComputeConfiguration.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ComputeConfiguration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ComputeConfiguration.Merge(m, src)
|
||||
}
|
||||
func (m *ComputeConfiguration) XXX_Size() int {
|
||||
return xxx_messageInfo_ComputeConfiguration.Size(m)
|
||||
}
|
||||
func (m *ComputeConfiguration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ComputeConfiguration.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ComputeConfiguration proto.InternalMessageInfo
|
||||
|
||||
func (m *ComputeConfiguration) GetCri() string {
|
||||
if m != nil {
|
||||
return m.Cri
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ComputeConfiguration) GetPublicKey() *SSHPublicKey {
|
||||
if m != nil {
|
||||
return m.PublicKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ComputeConfiguration) GetNodePools() []*NodePoolConfiguration {
|
||||
if m != nil {
|
||||
return m.NodePools
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ClusterConfiguration struct {
|
||||
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ClusterConfiguration) Reset() { *m = ClusterConfiguration{} }
|
||||
func (m *ClusterConfiguration) String() string { return proto.CompactTextString(m) }
|
||||
func (*ClusterConfiguration) ProtoMessage() {}
|
||||
func (*ClusterConfiguration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{7}
|
||||
}
|
||||
|
||||
func (m *ClusterConfiguration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ClusterConfiguration.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ClusterConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ClusterConfiguration.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ClusterConfiguration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ClusterConfiguration.Merge(m, src)
|
||||
}
|
||||
func (m *ClusterConfiguration) XXX_Size() int {
|
||||
return xxx_messageInfo_ClusterConfiguration.Size(m)
|
||||
}
|
||||
func (m *ClusterConfiguration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ClusterConfiguration.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ClusterConfiguration proto.InternalMessageInfo
|
||||
|
||||
func (m *ClusterConfiguration) GetVersion() string {
|
||||
if m != nil {
|
||||
return m.Version
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ClusterAPIConfiguration struct {
|
||||
ConfigurationEndpoint string `protobuf:"bytes,1,opt,name=ConfigurationEndpoint,proto3" json:"ConfigurationEndpoint,omitempty"`
|
||||
InfrastructureProviderVersion string `protobuf:"bytes,2,opt,name=InfrastructureProviderVersion,proto3" json:"InfrastructureProviderVersion,omitempty"`
|
||||
BootstrapProviderVersion string `protobuf:"bytes,3,opt,name=BootstrapProviderVersion,proto3" json:"BootstrapProviderVersion,omitempty"`
|
||||
ControlPlaneProviderVersion string `protobuf:"bytes,4,opt,name=ControlPlaneProviderVersion,proto3" json:"ControlPlaneProviderVersion,omitempty"`
|
||||
CoreProviderVersion string `protobuf:"bytes,5,opt,name=CoreProviderVersion,proto3" json:"CoreProviderVersion,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ClusterAPIConfiguration) Reset() { *m = ClusterAPIConfiguration{} }
|
||||
func (m *ClusterAPIConfiguration) String() string { return proto.CompactTextString(m) }
|
||||
func (*ClusterAPIConfiguration) ProtoMessage() {}
|
||||
func (*ClusterAPIConfiguration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{8}
|
||||
}
|
||||
|
||||
func (m *ClusterAPIConfiguration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ClusterAPIConfiguration.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ClusterAPIConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ClusterAPIConfiguration.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ClusterAPIConfiguration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ClusterAPIConfiguration.Merge(m, src)
|
||||
}
|
||||
func (m *ClusterAPIConfiguration) XXX_Size() int {
|
||||
return xxx_messageInfo_ClusterAPIConfiguration.Size(m)
|
||||
}
|
||||
func (m *ClusterAPIConfiguration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ClusterAPIConfiguration.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ClusterAPIConfiguration proto.InternalMessageInfo
|
||||
|
||||
func (m *ClusterAPIConfiguration) GetConfigurationEndpoint() string {
|
||||
if m != nil {
|
||||
return m.ConfigurationEndpoint
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ClusterAPIConfiguration) GetInfrastructureProviderVersion() string {
|
||||
if m != nil {
|
||||
return m.InfrastructureProviderVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ClusterAPIConfiguration) GetBootstrapProviderVersion() string {
|
||||
if m != nil {
|
||||
return m.BootstrapProviderVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ClusterAPIConfiguration) GetControlPlaneProviderVersion() string {
|
||||
if m != nil {
|
||||
return m.ControlPlaneProviderVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ClusterAPIConfiguration) GetCoreProviderVersion() string {
|
||||
if m != nil {
|
||||
return m.CoreProviderVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ContainerRegistry struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
|
||||
Username string `protobuf:"bytes,2,opt,name=Username,proto3" json:"Username,omitempty"`
|
||||
Password string `protobuf:"bytes,3,opt,name=Password,proto3" json:"Password,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ContainerRegistry) Reset() { *m = ContainerRegistry{} }
|
||||
func (m *ContainerRegistry) String() string { return proto.CompactTextString(m) }
|
||||
func (*ContainerRegistry) ProtoMessage() {}
|
||||
func (*ContainerRegistry) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{9}
|
||||
}
|
||||
|
||||
func (m *ContainerRegistry) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ContainerRegistry.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ContainerRegistry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ContainerRegistry.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ContainerRegistry) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ContainerRegistry.Merge(m, src)
|
||||
}
|
||||
func (m *ContainerRegistry) XXX_Size() int {
|
||||
return xxx_messageInfo_ContainerRegistry.Size(m)
|
||||
}
|
||||
func (m *ContainerRegistry) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ContainerRegistry.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ContainerRegistry proto.InternalMessageInfo
|
||||
|
||||
func (m *ContainerRegistry) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ContainerRegistry) GetUsername() string {
|
||||
if m != nil {
|
||||
return m.Username
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ContainerRegistry) GetPassword() string {
|
||||
if m != nil {
|
||||
return m.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Kubernetes struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Cluster *ClusterConfiguration `protobuf:"bytes,5,opt,name=cluster,proto3" json:"cluster,omitempty"`
|
||||
Network *NetworkConfiguration `protobuf:"bytes,6,opt,name=network,proto3" json:"network,omitempty"`
|
||||
Storage *StorageConfiguration `protobuf:"bytes,7,opt,name=storage,proto3" json:"storage,omitempty"`
|
||||
Compute *ComputeConfiguration `protobuf:"bytes,8,opt,name=compute,proto3" json:"compute,omitempty"`
|
||||
GroupName string `protobuf:"bytes,9,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
ManagementStrategy ManagementStrategyType `protobuf:"varint,10,opt,name=managementStrategy,proto3,enum=moc.cloudagent.kubernetes.ManagementStrategyType" json:"managementStrategy,omitempty"`
|
||||
LocationName string `protobuf:"bytes,11,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
KubeConfig []byte `protobuf:"bytes,12,opt,name=kubeConfig,proto3" json:"kubeConfig,omitempty"`
|
||||
CapiConfig *ClusterAPIConfiguration `protobuf:"bytes,13,opt,name=capiConfig,proto3" json:"capiConfig,omitempty"`
|
||||
ContainerRegistry *ContainerRegistry `protobuf:"bytes,14,opt,name=containerRegistry,proto3" json:"containerRegistry,omitempty"`
|
||||
DeploymentManifest []byte `protobuf:"bytes,15,opt,name=deploymentManifest,proto3" json:"deploymentManifest,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Kubernetes) Reset() { *m = Kubernetes{} }
|
||||
func (m *Kubernetes) String() string { return proto.CompactTextString(m) }
|
||||
func (*Kubernetes) ProtoMessage() {}
|
||||
func (*Kubernetes) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_40204d9320c6ada8, []int{10}
|
||||
}
|
||||
|
||||
func (m *Kubernetes) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Kubernetes.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Kubernetes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Kubernetes.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Kubernetes) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Kubernetes.Merge(m, src)
|
||||
}
|
||||
func (m *Kubernetes) XXX_Size() int {
|
||||
return xxx_messageInfo_Kubernetes.Size(m)
|
||||
}
|
||||
func (m *Kubernetes) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Kubernetes.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Kubernetes proto.InternalMessageInfo
|
||||
|
||||
func (m *Kubernetes) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetCluster() *ClusterConfiguration {
|
||||
if m != nil {
|
||||
return m.Cluster
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetNetwork() *NetworkConfiguration {
|
||||
if m != nil {
|
||||
return m.Network
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetStorage() *StorageConfiguration {
|
||||
if m != nil {
|
||||
return m.Storage
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetCompute() *ComputeConfiguration {
|
||||
if m != nil {
|
||||
return m.Compute
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetManagementStrategy() ManagementStrategyType {
|
||||
if m != nil {
|
||||
return m.ManagementStrategy
|
||||
}
|
||||
return ManagementStrategyType_Pivoted
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetKubeConfig() []byte {
|
||||
if m != nil {
|
||||
return m.KubeConfig
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetCapiConfig() *ClusterAPIConfiguration {
|
||||
if m != nil {
|
||||
return m.CapiConfig
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetContainerRegistry() *ContainerRegistry {
|
||||
if m != nil {
|
||||
return m.ContainerRegistry
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Kubernetes) GetDeploymentManifest() []byte {
|
||||
if m != nil {
|
||||
return m.DeploymentManifest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.cloudagent.kubernetes.NodeType", NodeType_name, NodeType_value)
|
||||
proto.RegisterEnum("moc.cloudagent.kubernetes.ManagementStrategyType", ManagementStrategyType_name, ManagementStrategyType_value)
|
||||
proto.RegisterType((*KubernetesRequest)(nil), "moc.cloudagent.kubernetes.KubernetesRequest")
|
||||
proto.RegisterType((*KubernetesResponse)(nil), "moc.cloudagent.kubernetes.KubernetesResponse")
|
||||
proto.RegisterType((*StorageConfiguration)(nil), "moc.cloudagent.kubernetes.StorageConfiguration")
|
||||
proto.RegisterType((*NetworkConfiguration)(nil), "moc.cloudagent.kubernetes.NetworkConfiguration")
|
||||
proto.RegisterType((*NodePoolConfiguration)(nil), "moc.cloudagent.kubernetes.NodePoolConfiguration")
|
||||
proto.RegisterType((*SSHPublicKey)(nil), "moc.cloudagent.kubernetes.SSHPublicKey")
|
||||
proto.RegisterType((*ComputeConfiguration)(nil), "moc.cloudagent.kubernetes.ComputeConfiguration")
|
||||
proto.RegisterType((*ClusterConfiguration)(nil), "moc.cloudagent.kubernetes.ClusterConfiguration")
|
||||
proto.RegisterType((*ClusterAPIConfiguration)(nil), "moc.cloudagent.kubernetes.ClusterAPIConfiguration")
|
||||
proto.RegisterType((*ContainerRegistry)(nil), "moc.cloudagent.kubernetes.ContainerRegistry")
|
||||
proto.RegisterType((*Kubernetes)(nil), "moc.cloudagent.kubernetes.Kubernetes")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("kubernetes.proto", fileDescriptor_40204d9320c6ada8) }
|
||||
|
||||
var fileDescriptor_40204d9320c6ada8 = []byte{
|
||||
// 1060 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6e, 0xdb, 0xc6,
|
||||
0x13, 0x36, 0xe5, 0x58, 0xb6, 0x46, 0xb2, 0x2d, 0xef, 0xcf, 0xc9, 0x8f, 0x75, 0xdb, 0xc0, 0x60,
|
||||
0xd0, 0x56, 0x30, 0x12, 0xc9, 0x55, 0x72, 0xea, 0xa5, 0x8d, 0x65, 0xa3, 0x35, 0x12, 0xbb, 0x02,
|
||||
0xd5, 0x3a, 0x40, 0x2e, 0xc5, 0x9a, 0x1c, 0xb1, 0x0b, 0x93, 0xbb, 0xec, 0xee, 0xd2, 0xae, 0xf2,
|
||||
0x0c, 0x3d, 0xf5, 0x21, 0xda, 0x17, 0xe8, 0xbd, 0xa7, 0xbe, 0x57, 0xc1, 0x25, 0x29, 0x52, 0x7f,
|
||||
0x22, 0xe7, 0xd0, 0x1b, 0x67, 0xe6, 0xfb, 0x3e, 0xcd, 0xcc, 0xce, 0x8e, 0x16, 0xda, 0x37, 0xc9,
|
||||
0x35, 0x4a, 0x8e, 0x1a, 0x55, 0x37, 0x96, 0x42, 0x0b, 0xf2, 0x51, 0x24, 0xbc, 0xae, 0x17, 0x8a,
|
||||
0xc4, 0xa7, 0x01, 0x72, 0xdd, 0x2d, 0x01, 0x07, 0x8f, 0x03, 0x21, 0x82, 0x10, 0x7b, 0x06, 0x78,
|
||||
0x9d, 0x8c, 0x7b, 0x77, 0x92, 0xc6, 0x31, 0xca, 0x9c, 0x7a, 0xd0, 0xf2, 0x44, 0x14, 0x09, 0x9e,
|
||||
0x59, 0xce, 0xef, 0x16, 0xec, 0xbd, 0x9a, 0x92, 0x5d, 0xfc, 0x25, 0x41, 0xa5, 0xc9, 0xb7, 0xd0,
|
||||
0x2c, 0x9d, 0xca, 0xb6, 0x0e, 0xd7, 0x3b, 0xcd, 0xfe, 0x67, 0xdd, 0xf7, 0xfe, 0x68, 0xb7, 0x22,
|
||||
0x51, 0x65, 0x92, 0x17, 0xb0, 0xfd, 0x7d, 0x8c, 0x92, 0x6a, 0x26, 0xf8, 0x0f, 0x93, 0x18, 0xed,
|
||||
0xda, 0xa1, 0xd5, 0xd9, 0xe9, 0xef, 0x18, 0xa9, 0x69, 0xc4, 0x9d, 0x05, 0x39, 0x7f, 0x5a, 0x40,
|
||||
0xaa, 0x49, 0xa9, 0x58, 0x70, 0x85, 0xff, 0x5d, 0x56, 0x7d, 0xa8, 0xbb, 0xa8, 0x92, 0x50, 0x9b,
|
||||
0x74, 0x9a, 0xfd, 0x83, 0x6e, 0xd6, 0xb3, 0x6e, 0xd1, 0xb3, 0xee, 0x89, 0x10, 0xe1, 0x15, 0x0d,
|
||||
0x13, 0x74, 0x73, 0x24, 0xd9, 0x87, 0x8d, 0x33, 0x29, 0x85, 0xb4, 0xd7, 0x0f, 0xad, 0x4e, 0xc3,
|
||||
0xcd, 0x0c, 0xa7, 0x03, 0xfb, 0x23, 0x2d, 0x24, 0x0d, 0x70, 0x20, 0xf8, 0x98, 0x05, 0x49, 0x56,
|
||||
0x05, 0x69, 0xc3, 0xba, 0xa7, 0x98, 0x6d, 0x19, 0x6c, 0xfa, 0xe9, 0xfc, 0x56, 0x83, 0xfd, 0x4b,
|
||||
0xd4, 0x77, 0x42, 0xde, 0x2c, 0x42, 0x79, 0x09, 0xe5, 0x8c, 0xd8, 0xb0, 0x19, 0x0b, 0x7f, 0xc0,
|
||||
0x7c, 0x69, 0xf2, 0x6b, 0xb8, 0x85, 0x49, 0x0e, 0xa1, 0xe9, 0x85, 0x89, 0xd2, 0x28, 0x4d, 0x34,
|
||||
0x4b, 0xa5, 0xea, 0x22, 0x47, 0xd0, 0xf6, 0x04, 0xd7, 0x52, 0x84, 0xc3, 0x90, 0x72, 0x34, 0xb0,
|
||||
0x07, 0x06, 0xb6, 0xe0, 0x27, 0x9f, 0xc3, 0xce, 0x2d, 0x93, 0x3a, 0xa1, 0x21, 0xcf, 0x12, 0xb3,
|
||||
0x37, 0x0c, 0x72, 0xce, 0x4b, 0x3a, 0xb0, 0x1b, 0x0a, 0xea, 0x9f, 0xd0, 0x90, 0x72, 0x0f, 0xe5,
|
||||
0x15, 0x8b, 0xed, 0xba, 0x01, 0xce, 0xbb, 0xe7, 0x91, 0x17, 0xd4, 0xb3, 0x37, 0x17, 0x91, 0x17,
|
||||
0xd4, 0x73, 0xfe, 0xb2, 0xe0, 0xe1, 0xa5, 0xf0, 0x71, 0x28, 0x44, 0x38, 0xdb, 0x8f, 0xaf, 0x61,
|
||||
0x2b, 0x0d, 0x98, 0x69, 0xb1, 0xcc, 0xb4, 0x3c, 0x59, 0x71, 0xc4, 0x05, 0xd4, 0x9d, 0x92, 0xd2,
|
||||
0xb2, 0x58, 0x44, 0x03, 0x94, 0x38, 0x46, 0x89, 0xdc, 0xc3, 0xbc, 0x8b, 0x73, 0x5e, 0x72, 0x00,
|
||||
0x5b, 0x12, 0xe3, 0x90, 0x79, 0x54, 0x99, 0x4e, 0x6e, 0xb8, 0x53, 0x9b, 0x3c, 0x82, 0xfa, 0xd5,
|
||||
0xc5, 0x88, 0xbd, 0xc3, 0xbc, 0x79, 0xb9, 0xe5, 0x74, 0xa0, 0x35, 0x1a, 0x7d, 0x37, 0x4c, 0xae,
|
||||
0x43, 0xe6, 0xbd, 0xc2, 0x49, 0x7a, 0x54, 0x37, 0x38, 0x39, 0xa5, 0x9a, 0xe6, 0x07, 0x58, 0x98,
|
||||
0xce, 0xdf, 0x16, 0xec, 0x0f, 0x44, 0x14, 0x27, 0x7a, 0xc9, 0x68, 0xc8, 0xf2, 0xbc, 0x25, 0x23,
|
||||
0x67, 0xd0, 0x88, 0x0b, 0xc5, 0x7c, 0x22, 0xbf, 0x58, 0x51, 0x72, 0x35, 0x01, 0xb7, 0x64, 0x92,
|
||||
0x4b, 0x68, 0x14, 0x1d, 0x4d, 0x0b, 0x4a, 0x2f, 0xc7, 0xf1, 0x3d, 0x9d, 0x5b, 0xe8, 0xbe, 0x5b,
|
||||
0x4a, 0x38, 0xc7, 0xb0, 0x3f, 0xc8, 0x27, 0x6b, 0xa6, 0x00, 0x1b, 0x36, 0x6f, 0x51, 0x2a, 0x26,
|
||||
0x78, 0x51, 0x73, 0x6e, 0x3a, 0xff, 0xd4, 0xe0, 0xff, 0x39, 0xe5, 0xe5, 0xf0, 0x7c, 0x96, 0xf5,
|
||||
0x02, 0x1e, 0xce, 0x38, 0xce, 0xb8, 0x1f, 0x0b, 0xc6, 0x75, 0xae, 0xb1, 0x3c, 0x48, 0x4e, 0xe1,
|
||||
0xd3, 0x73, 0x3e, 0x96, 0x54, 0x69, 0x99, 0x78, 0x3a, 0x91, 0x38, 0x94, 0xe2, 0x96, 0xf9, 0x28,
|
||||
0xaf, 0xf2, 0x0c, 0xb2, 0xa3, 0x5d, 0x0d, 0x22, 0x5f, 0x81, 0x7d, 0x22, 0x84, 0x56, 0x5a, 0xd2,
|
||||
0x78, 0x5e, 0x20, 0xbb, 0x43, 0xef, 0x8d, 0x93, 0x6f, 0xe0, 0xe3, 0x41, 0xe5, 0xe2, 0xcc, 0xd3,
|
||||
0xb3, 0xf1, 0x58, 0x05, 0x21, 0xc7, 0xf0, 0xbf, 0x81, 0x58, 0xcc, 0x3c, 0xbb, 0x6b, 0xcb, 0x42,
|
||||
0xce, 0x4f, 0xb0, 0x97, 0x0a, 0x52, 0xc6, 0x51, 0xba, 0x18, 0x30, 0xa5, 0xe5, 0x84, 0x10, 0x78,
|
||||
0x70, 0x49, 0x23, 0xcc, 0xfb, 0x65, 0xbe, 0xd3, 0x11, 0xfe, 0x51, 0xa1, 0xe4, 0xa9, 0x3f, 0xeb,
|
||||
0xc4, 0xd4, 0x4e, 0x63, 0x43, 0xaa, 0xd4, 0x9d, 0x90, 0x7e, 0x5e, 0xe4, 0xd4, 0x76, 0xfe, 0xa8,
|
||||
0x03, 0x94, 0x0b, 0x31, 0x95, 0xe6, 0x15, 0x69, 0x43, 0xdf, 0x81, 0x1a, 0xf3, 0x73, 0xd1, 0x1a,
|
||||
0xf3, 0xc9, 0x13, 0xa8, 0x2b, 0x4d, 0x75, 0xa2, 0x4c, 0xc9, 0xcd, 0x7e, 0xd3, 0x8c, 0xd6, 0xc8,
|
||||
0xb8, 0xdc, 0x3c, 0x44, 0xce, 0x61, 0x33, 0x5f, 0x46, 0xa6, 0xbc, 0x66, 0xbf, 0xb7, 0x62, 0x00,
|
||||
0x97, 0x0d, 0x97, 0x5b, 0xf0, 0x53, 0xa9, 0x62, 0x2b, 0xd5, 0xef, 0x95, 0x5a, 0xb6, 0x58, 0xdd,
|
||||
0x82, 0x9f, 0x4a, 0xa9, 0x6c, 0x49, 0x9b, 0x6d, 0xb4, 0x5a, 0x6a, 0xd9, 0x3a, 0x77, 0x0b, 0xbe,
|
||||
0x29, 0x30, 0xbb, 0xd4, 0xf6, 0xd6, 0xfd, 0x05, 0x2e, 0xb9, 0xfe, 0x6e, 0xc1, 0x27, 0x9f, 0x40,
|
||||
0x23, 0x90, 0x22, 0x89, 0xcd, 0xa1, 0x36, 0x4c, 0x9f, 0x4b, 0x07, 0xa1, 0x40, 0x22, 0xca, 0x69,
|
||||
0x80, 0x11, 0x72, 0x3d, 0xd2, 0x92, 0x6a, 0x0c, 0x26, 0x36, 0x98, 0x7d, 0xf8, 0xe5, 0x8a, 0xdf,
|
||||
0xbc, 0x58, 0x20, 0x99, 0xed, 0xb8, 0x44, 0x8c, 0x38, 0xd0, 0x0a, 0x85, 0x67, 0xb2, 0x32, 0x39,
|
||||
0x34, 0x4d, 0x0e, 0x33, 0x3e, 0xf2, 0x18, 0x20, 0x15, 0xcf, 0x4a, 0xb0, 0x5b, 0x87, 0x56, 0xa7,
|
||||
0xe5, 0x56, 0x3c, 0xc4, 0x05, 0xf0, 0x68, 0xcc, 0xf2, 0xf8, 0xb6, 0x69, 0x49, 0xff, 0xfe, 0x33,
|
||||
0x9f, 0xdf, 0x0e, 0x6e, 0x45, 0x85, 0xbc, 0x85, 0x3d, 0x6f, 0x7e, 0xfa, 0xed, 0x1d, 0x23, 0xfd,
|
||||
0x74, 0x65, 0xb7, 0xe7, 0x38, 0xee, 0xa2, 0x0c, 0xe9, 0x02, 0xf1, 0x31, 0x0e, 0xc5, 0x24, 0xed,
|
||||
0xc4, 0x05, 0xe5, 0x6c, 0x8c, 0x4a, 0xdb, 0xbb, 0xa6, 0xae, 0x25, 0x91, 0x23, 0xb7, 0xfc, 0x33,
|
||||
0x22, 0x6d, 0x68, 0x55, 0xaf, 0x79, 0x7b, 0x8d, 0xec, 0x42, 0xf3, 0x35, 0xe3, 0xc9, 0xaf, 0x6f,
|
||||
0x84, 0xbc, 0x41, 0xd9, 0xb6, 0xc8, 0x1e, 0x6c, 0xbf, 0x61, 0xdc, 0x17, 0x77, 0x2a, 0x77, 0xd5,
|
||||
0x52, 0xd6, 0xeb, 0xca, 0x7f, 0x5f, 0x7b, 0xfd, 0xe8, 0x39, 0x3c, 0x5a, 0x7e, 0x4a, 0xa4, 0x09,
|
||||
0x9b, 0x43, 0x76, 0x2b, 0x34, 0xfa, 0xed, 0x35, 0xd2, 0x82, 0xad, 0x53, 0xa6, 0x34, 0xe3, 0x9e,
|
||||
0x6e, 0x5b, 0xfd, 0x77, 0xb0, 0x5b, 0x5e, 0xd8, 0x97, 0x69, 0xed, 0x24, 0x80, 0xfa, 0x39, 0xbf,
|
||||
0x15, 0x37, 0x48, 0x9e, 0x7e, 0xd8, 0x1b, 0x28, 0x7b, 0xdc, 0x1d, 0x3c, 0xfb, 0x40, 0x74, 0xf6,
|
||||
0xea, 0x72, 0xd6, 0x4e, 0x7a, 0x6f, 0x9f, 0x05, 0x4c, 0xff, 0x9c, 0x5c, 0x77, 0x3d, 0x11, 0xf5,
|
||||
0x22, 0xe6, 0x49, 0xa1, 0xc4, 0x58, 0xf7, 0x22, 0xe1, 0xf5, 0x64, 0xec, 0xf5, 0x4a, 0xa9, 0xec,
|
||||
0xf3, 0xba, 0x6e, 0xde, 0x51, 0xcf, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x81, 0xba, 0x1e,
|
||||
0xb8, 0x0a, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// KubernetesAgentClient is the client API for KubernetesAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type KubernetesAgentClient interface {
|
||||
Invoke(ctx context.Context, in *KubernetesRequest, opts ...grpc.CallOption) (*KubernetesResponse, error)
|
||||
}
|
||||
|
||||
type kubernetesAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewKubernetesAgentClient(cc *grpc.ClientConn) KubernetesAgentClient {
|
||||
return &kubernetesAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *kubernetesAgentClient) Invoke(ctx context.Context, in *KubernetesRequest, opts ...grpc.CallOption) (*KubernetesResponse, error) {
|
||||
out := new(KubernetesResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.kubernetes.KubernetesAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// KubernetesAgentServer is the server API for KubernetesAgent service.
|
||||
type KubernetesAgentServer interface {
|
||||
Invoke(context.Context, *KubernetesRequest) (*KubernetesResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedKubernetesAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedKubernetesAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedKubernetesAgentServer) Invoke(ctx context.Context, req *KubernetesRequest) (*KubernetesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterKubernetesAgentServer(s *grpc.Server, srv KubernetesAgentServer) {
|
||||
s.RegisterService(&_KubernetesAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _KubernetesAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(KubernetesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(KubernetesAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.kubernetes.KubernetesAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(KubernetesAgentServer).Invoke(ctx, req.(*KubernetesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _KubernetesAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.kubernetes.KubernetesAgent",
|
||||
HandlerType: (*KubernetesAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _KubernetesAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "kubernetes.proto",
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/cloud";
|
||||
package moc.cloudagent.kubernetes;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
message KubernetesRequest {
|
||||
repeated Kubernetes Kubernetess = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message KubernetesResponse {
|
||||
repeated Kubernetes Kubernetess = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message StorageConfiguration {
|
||||
string csi = 1;
|
||||
}
|
||||
|
||||
message NetworkConfiguration {
|
||||
string cni = 1;
|
||||
string podCidr = 2;
|
||||
string clusterCidr = 3;
|
||||
// TODO: merge controlplane cidr and network
|
||||
string controlPlaneCidr = 4;
|
||||
string virtualnetwork = 5;
|
||||
string loadBalancerVip = 6;
|
||||
string loadBalancerMac = 7;
|
||||
}
|
||||
|
||||
enum NodeType {
|
||||
ControlPlane = 0;
|
||||
LinuxWorker = 1;
|
||||
WindowsWorker = 2;
|
||||
LoadBalancer = 3;
|
||||
}
|
||||
|
||||
enum ManagementStrategyType {
|
||||
Pivoted = 0;
|
||||
Distinct = 1;
|
||||
}
|
||||
|
||||
message NodePoolConfiguration {
|
||||
NodeType NodeType = 1;
|
||||
string imagereference = 2;
|
||||
int32 replicas = 3;
|
||||
string VMSize = 4;
|
||||
}
|
||||
|
||||
message SSHPublicKey {
|
||||
string keyData = 1;
|
||||
}
|
||||
|
||||
message ComputeConfiguration {
|
||||
string cri = 1;
|
||||
SSHPublicKey publicKey = 2;
|
||||
repeated NodePoolConfiguration NodePools = 3;
|
||||
}
|
||||
|
||||
message ClusterConfiguration {
|
||||
string version = 1;
|
||||
}
|
||||
|
||||
message ClusterAPIConfiguration {
|
||||
string ConfigurationEndpoint = 1;
|
||||
string InfrastructureProviderVersion = 2;
|
||||
string BootstrapProviderVersion = 3;
|
||||
string ControlPlaneProviderVersion = 4;
|
||||
string CoreProviderVersion = 5;
|
||||
}
|
||||
|
||||
message ContainerRegistry {
|
||||
string Name = 1;
|
||||
string Username = 2;
|
||||
string Password = 3;
|
||||
}
|
||||
|
||||
message Kubernetes {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
Status status = 4;
|
||||
ClusterConfiguration cluster = 5;
|
||||
NetworkConfiguration network = 6;
|
||||
StorageConfiguration storage = 7;
|
||||
ComputeConfiguration compute = 8;
|
||||
string groupName = 9;
|
||||
ManagementStrategyType managementStrategy = 10;
|
||||
string locationName = 11;
|
||||
bytes kubeConfig = 12;
|
||||
ClusterAPIConfiguration capiConfig = 13;
|
||||
ContainerRegistry containerRegistry = 14;
|
||||
bytes deploymentManifest = 15;
|
||||
}
|
||||
|
||||
service KubernetesAgent {
|
||||
rpc Invoke(KubernetesRequest) returns (KubernetesResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,298 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: location.proto
|
||||
|
||||
package cloud
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type LocationRequest struct {
|
||||
Locations []*Location `protobuf:"bytes,1,rep,name=Locations,proto3" json:"Locations,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LocationRequest) Reset() { *m = LocationRequest{} }
|
||||
func (m *LocationRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LocationRequest) ProtoMessage() {}
|
||||
func (*LocationRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4f0f35158dcf9f2c, []int{0}
|
||||
}
|
||||
|
||||
func (m *LocationRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LocationRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LocationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LocationRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LocationRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LocationRequest.Merge(m, src)
|
||||
}
|
||||
func (m *LocationRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_LocationRequest.Size(m)
|
||||
}
|
||||
func (m *LocationRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LocationRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LocationRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *LocationRequest) GetLocations() []*Location {
|
||||
if m != nil {
|
||||
return m.Locations
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LocationRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type LocationResponse struct {
|
||||
Locations []*Location `protobuf:"bytes,1,rep,name=Locations,proto3" json:"Locations,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LocationResponse) Reset() { *m = LocationResponse{} }
|
||||
func (m *LocationResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LocationResponse) ProtoMessage() {}
|
||||
func (*LocationResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4f0f35158dcf9f2c, []int{1}
|
||||
}
|
||||
|
||||
func (m *LocationResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LocationResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LocationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LocationResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LocationResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LocationResponse.Merge(m, src)
|
||||
}
|
||||
func (m *LocationResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_LocationResponse.Size(m)
|
||||
}
|
||||
func (m *LocationResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LocationResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LocationResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *LocationResponse) GetLocations() []*Location {
|
||||
if m != nil {
|
||||
return m.Locations
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LocationResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LocationResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Location struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Location) Reset() { *m = Location{} }
|
||||
func (m *Location) String() string { return proto.CompactTextString(m) }
|
||||
func (*Location) ProtoMessage() {}
|
||||
func (*Location) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4f0f35158dcf9f2c, []int{2}
|
||||
}
|
||||
|
||||
func (m *Location) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Location.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Location.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Location) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Location.Merge(m, src)
|
||||
}
|
||||
func (m *Location) XXX_Size() int {
|
||||
return xxx_messageInfo_Location.Size(m)
|
||||
}
|
||||
func (m *Location) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Location.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Location proto.InternalMessageInfo
|
||||
|
||||
func (m *Location) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Location) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Location) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*LocationRequest)(nil), "moc.cloudagent.location.LocationRequest")
|
||||
proto.RegisterType((*LocationResponse)(nil), "moc.cloudagent.location.LocationResponse")
|
||||
proto.RegisterType((*Location)(nil), "moc.cloudagent.location.Location")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("location.proto", fileDescriptor_4f0f35158dcf9f2c) }
|
||||
|
||||
var fileDescriptor_4f0f35158dcf9f2c = []byte{
|
||||
// 343 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x51, 0x4d, 0x4b, 0xeb, 0x40,
|
||||
0x14, 0x7d, 0x69, 0xdf, 0x0b, 0xaf, 0x93, 0xd7, 0x3c, 0x19, 0x04, 0x43, 0x16, 0x52, 0xe3, 0x26,
|
||||
0x2e, 0x9c, 0x81, 0xe8, 0x5e, 0x2c, 0xb8, 0x10, 0x04, 0x61, 0x2a, 0x2e, 0xdc, 0x48, 0x3a, 0x9d,
|
||||
0xc6, 0x60, 0x26, 0x77, 0x9c, 0x0f, 0xc5, 0x7f, 0xe0, 0x9f, 0xf0, 0xbf, 0x8a, 0x93, 0xa6, 0xc5,
|
||||
0x85, 0x28, 0xb8, 0x9b, 0x7b, 0xef, 0x39, 0xe7, 0x9e, 0x7b, 0x06, 0xc5, 0x0d, 0xf0, 0xd2, 0xd6,
|
||||
0xd0, 0x12, 0xa5, 0xc1, 0x02, 0xde, 0x91, 0xc0, 0x09, 0x6f, 0xc0, 0x2d, 0xca, 0x4a, 0xb4, 0x96,
|
||||
0xf4, 0xe3, 0x74, 0xb7, 0x02, 0xa8, 0x1a, 0x41, 0x3d, 0x6c, 0xee, 0x96, 0xf4, 0x49, 0x97, 0x4a,
|
||||
0x09, 0x6d, 0x3a, 0x62, 0xfa, 0x8f, 0x83, 0x94, 0xbd, 0x4c, 0xf6, 0x12, 0xa0, 0xff, 0x17, 0x2b,
|
||||
0x2a, 0x13, 0x0f, 0x4e, 0x18, 0x8b, 0x4f, 0xd0, 0xa8, 0x6f, 0x99, 0x24, 0x98, 0x0c, 0xf3, 0xa8,
|
||||
0xd8, 0x23, 0x9f, 0xac, 0x23, 0x6b, 0xf2, 0x86, 0x83, 0x8f, 0xd1, 0xf8, 0x52, 0x09, 0xed, 0xab,
|
||||
0xab, 0x67, 0x25, 0x92, 0xc1, 0x24, 0xc8, 0xe3, 0x22, 0xf6, 0x22, 0xeb, 0x09, 0xfb, 0x08, 0xca,
|
||||
0x5e, 0x03, 0xb4, 0xb5, 0xb1, 0x62, 0x14, 0xb4, 0x46, 0xfc, 0xdc, 0x4b, 0x81, 0x42, 0x26, 0x8c,
|
||||
0x6b, 0xac, 0x37, 0x11, 0x15, 0x29, 0xe9, 0xf2, 0x21, 0x7d, 0x3e, 0x64, 0x0a, 0xd0, 0x5c, 0x97,
|
||||
0x8d, 0x13, 0x6c, 0x85, 0xc4, 0xdb, 0xe8, 0xcf, 0x99, 0xd6, 0xa0, 0x93, 0xe1, 0x24, 0xc8, 0x47,
|
||||
0xac, 0x2b, 0xb2, 0x19, 0xfa, 0xdb, 0xcb, 0x62, 0x8c, 0x7e, 0xb7, 0xa5, 0x14, 0x49, 0xe0, 0x01,
|
||||
0xfe, 0x8d, 0x63, 0x34, 0xa8, 0x17, 0x7e, 0xcb, 0x88, 0x0d, 0xea, 0x05, 0xde, 0x47, 0xa1, 0xb1,
|
||||
0xa5, 0x75, 0xc6, 0xcb, 0x44, 0x45, 0xe4, 0x7d, 0xcf, 0x7c, 0x8b, 0xad, 0x46, 0x85, 0x42, 0xe3,
|
||||
0x5e, 0xf4, 0xf4, 0xfd, 0x18, 0x7c, 0x8b, 0xc2, 0xf3, 0xf6, 0x11, 0xee, 0x05, 0xce, 0xbf, 0xbe,
|
||||
0xb3, 0xfb, 0xb0, 0xf4, 0xe0, 0x1b, 0xc8, 0x2e, 0xcf, 0xec, 0xd7, 0x94, 0xde, 0x1c, 0x56, 0xb5,
|
||||
0xbd, 0x73, 0x73, 0xc2, 0x41, 0x52, 0x59, 0x73, 0x0d, 0x06, 0x96, 0x96, 0x4a, 0xe0, 0x54, 0x2b,
|
||||
0x4e, 0x37, 0x32, 0xdd, 0x73, 0x1e, 0xfa, 0xa4, 0x8e, 0xde, 0x02, 0x00, 0x00, 0xff, 0xff, 0x69,
|
||||
0x7b, 0x98, 0xa2, 0x82, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// LocationAgentClient is the client API for LocationAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type LocationAgentClient interface {
|
||||
Invoke(ctx context.Context, in *LocationRequest, opts ...grpc.CallOption) (*LocationResponse, error)
|
||||
}
|
||||
|
||||
type locationAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewLocationAgentClient(cc *grpc.ClientConn) LocationAgentClient {
|
||||
return &locationAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *locationAgentClient) Invoke(ctx context.Context, in *LocationRequest, opts ...grpc.CallOption) (*LocationResponse, error) {
|
||||
out := new(LocationResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.location.LocationAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// LocationAgentServer is the server API for LocationAgent service.
|
||||
type LocationAgentServer interface {
|
||||
Invoke(context.Context, *LocationRequest) (*LocationResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedLocationAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedLocationAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedLocationAgentServer) Invoke(ctx context.Context, req *LocationRequest) (*LocationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterLocationAgentServer(s *grpc.Server, srv LocationAgentServer) {
|
||||
s.RegisterService(&_LocationAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _LocationAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LocationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(LocationAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.location.LocationAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(LocationAgentServer).Invoke(ctx, req.(*LocationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _LocationAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.location.LocationAgent",
|
||||
HandlerType: (*LocationAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _LocationAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "location.proto",
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/cloud";
|
||||
package moc.cloudagent.location;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
message LocationRequest {
|
||||
repeated Location Locations = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message LocationResponse {
|
||||
repeated Location Locations = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message Location {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
Status status = 3;
|
||||
}
|
||||
|
||||
service LocationAgent {
|
||||
rpc Invoke(LocationRequest) returns (LocationResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,392 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: node.proto
|
||||
|
||||
package cloud
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type NodeState int32
|
||||
|
||||
const (
|
||||
NodeState_Unknown NodeState = 0
|
||||
NodeState_Active NodeState = 1
|
||||
NodeState_Inactive NodeState = 2
|
||||
)
|
||||
|
||||
var NodeState_name = map[int32]string{
|
||||
0: "Unknown",
|
||||
1: "Active",
|
||||
2: "Inactive",
|
||||
}
|
||||
|
||||
var NodeState_value = map[string]int32{
|
||||
"Unknown": 0,
|
||||
"Active": 1,
|
||||
"Inactive": 2,
|
||||
}
|
||||
|
||||
func (x NodeState) String() string {
|
||||
return proto.EnumName(NodeState_name, int32(x))
|
||||
}
|
||||
|
||||
func (NodeState) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0c843d59d2d938e7, []int{0}
|
||||
}
|
||||
|
||||
type NodeRequest struct {
|
||||
Nodes []*Node `protobuf:"bytes,1,rep,name=Nodes,proto3" json:"Nodes,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NodeRequest) Reset() { *m = NodeRequest{} }
|
||||
func (m *NodeRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodeRequest) ProtoMessage() {}
|
||||
func (*NodeRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0c843d59d2d938e7, []int{0}
|
||||
}
|
||||
|
||||
func (m *NodeRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NodeRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NodeRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NodeRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NodeRequest.Merge(m, src)
|
||||
}
|
||||
func (m *NodeRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_NodeRequest.Size(m)
|
||||
}
|
||||
func (m *NodeRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NodeRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NodeRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *NodeRequest) GetNodes() []*Node {
|
||||
if m != nil {
|
||||
return m.Nodes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NodeRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type NodeResponse struct {
|
||||
Nodes []*Node `protobuf:"bytes,1,rep,name=Nodes,proto3" json:"Nodes,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NodeResponse) Reset() { *m = NodeResponse{} }
|
||||
func (m *NodeResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodeResponse) ProtoMessage() {}
|
||||
func (*NodeResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0c843d59d2d938e7, []int{1}
|
||||
}
|
||||
|
||||
func (m *NodeResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NodeResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NodeResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NodeResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NodeResponse.Merge(m, src)
|
||||
}
|
||||
func (m *NodeResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_NodeResponse.Size(m)
|
||||
}
|
||||
func (m *NodeResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NodeResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NodeResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *NodeResponse) GetNodes() []*Node {
|
||||
if m != nil {
|
||||
return m.Nodes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NodeResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NodeResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Node struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Fqdn string `protobuf:"bytes,3,opt,name=fqdn,proto3" json:"fqdn,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
|
||||
LocationName string `protobuf:"bytes,5,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
Certificate string `protobuf:"bytes,6,opt,name=certificate,proto3" json:"certificate,omitempty"`
|
||||
Port int32 `protobuf:"varint,7,opt,name=port,proto3" json:"port,omitempty"`
|
||||
AuthorizerPort int32 `protobuf:"varint,8,opt,name=authorizerPort,proto3" json:"authorizerPort,omitempty"`
|
||||
RunningState NodeState `protobuf:"varint,9,opt,name=runningState,proto3,enum=moc.cloudagent.node.NodeState" json:"runningState,omitempty"`
|
||||
Info *common.NodeInfo `protobuf:"bytes,10,opt,name=info,proto3" json:"info,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Node) Reset() { *m = Node{} }
|
||||
func (m *Node) String() string { return proto.CompactTextString(m) }
|
||||
func (*Node) ProtoMessage() {}
|
||||
func (*Node) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0c843d59d2d938e7, []int{2}
|
||||
}
|
||||
|
||||
func (m *Node) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Node.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Node.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Node) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Node.Merge(m, src)
|
||||
}
|
||||
func (m *Node) XXX_Size() int {
|
||||
return xxx_messageInfo_Node.Size(m)
|
||||
}
|
||||
func (m *Node) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Node.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Node proto.InternalMessageInfo
|
||||
|
||||
func (m *Node) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Node) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Node) GetFqdn() string {
|
||||
if m != nil {
|
||||
return m.Fqdn
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Node) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Node) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Node) GetCertificate() string {
|
||||
if m != nil {
|
||||
return m.Certificate
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Node) GetPort() int32 {
|
||||
if m != nil {
|
||||
return m.Port
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Node) GetAuthorizerPort() int32 {
|
||||
if m != nil {
|
||||
return m.AuthorizerPort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Node) GetRunningState() NodeState {
|
||||
if m != nil {
|
||||
return m.RunningState
|
||||
}
|
||||
return NodeState_Unknown
|
||||
}
|
||||
|
||||
func (m *Node) GetInfo() *common.NodeInfo {
|
||||
if m != nil {
|
||||
return m.Info
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.cloudagent.node.NodeState", NodeState_name, NodeState_value)
|
||||
proto.RegisterType((*NodeRequest)(nil), "moc.cloudagent.node.NodeRequest")
|
||||
proto.RegisterType((*NodeResponse)(nil), "moc.cloudagent.node.NodeResponse")
|
||||
proto.RegisterType((*Node)(nil), "moc.cloudagent.node.Node")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("node.proto", fileDescriptor_0c843d59d2d938e7) }
|
||||
|
||||
var fileDescriptor_0c843d59d2d938e7 = []byte{
|
||||
// 488 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x4d, 0x6f, 0xd3, 0x40,
|
||||
0x10, 0xad, 0xd3, 0xc4, 0x6d, 0xc6, 0x21, 0xaa, 0x96, 0x1e, 0x4c, 0x0e, 0x95, 0x09, 0x12, 0x8a,
|
||||
0x90, 0xb0, 0x25, 0xc3, 0x1f, 0x68, 0x24, 0x0e, 0xb9, 0xb4, 0x68, 0xf9, 0x38, 0x20, 0x2e, 0xce,
|
||||
0x7a, 0xed, 0xae, 0x6a, 0xef, 0xb8, 0xeb, 0x75, 0x2b, 0xf8, 0x07, 0xfc, 0x3e, 0xfe, 0x10, 0xda,
|
||||
0xd9, 0x50, 0x08, 0xa2, 0x48, 0xdc, 0x76, 0xe6, 0xbd, 0x37, 0x6f, 0x3c, 0x7e, 0x00, 0x1a, 0x4b,
|
||||
0x99, 0x76, 0x06, 0x2d, 0xb2, 0xc7, 0x2d, 0x8a, 0x54, 0x34, 0x38, 0x94, 0x45, 0x2d, 0xb5, 0x4d,
|
||||
0x1d, 0xb4, 0x38, 0xab, 0x11, 0xeb, 0x46, 0x66, 0x44, 0xd9, 0x0e, 0x55, 0x76, 0x67, 0x8a, 0xae,
|
||||
0x93, 0xa6, 0xf7, 0xa2, 0xc5, 0x4c, 0x60, 0xdb, 0xa2, 0xde, 0x55, 0x73, 0xa7, 0x51, 0xba, 0x42,
|
||||
0x5f, 0x2f, 0x2d, 0x44, 0x17, 0x58, 0x4a, 0x2e, 0x6f, 0x06, 0xd9, 0x5b, 0x96, 0xc1, 0xc4, 0x95,
|
||||
0x7d, 0x1c, 0x24, 0x87, 0xab, 0x28, 0x7f, 0x92, 0xfe, 0xc5, 0x31, 0x25, 0x81, 0xe7, 0xb1, 0xd7,
|
||||
0xf0, 0xe8, 0xb2, 0x93, 0xa6, 0xb0, 0x0a, 0xf5, 0xfb, 0x2f, 0x9d, 0x8c, 0x47, 0x49, 0xb0, 0x9a,
|
||||
0xe7, 0x73, 0x12, 0xde, 0x23, 0x7c, 0x9f, 0xb4, 0xfc, 0x16, 0xc0, 0xcc, 0xdb, 0xf6, 0x1d, 0xea,
|
||||
0x5e, 0xfe, 0xbf, 0x6f, 0x0e, 0x21, 0x97, 0xfd, 0xd0, 0x58, 0x32, 0x8c, 0xf2, 0x45, 0xea, 0xcf,
|
||||
0x90, 0xfe, 0x3c, 0x43, 0xba, 0x46, 0x6c, 0x3e, 0x16, 0xcd, 0x20, 0xf9, 0x8e, 0xc9, 0x4e, 0x61,
|
||||
0xf2, 0xc6, 0x18, 0x34, 0xf1, 0x61, 0x12, 0xac, 0xa6, 0xdc, 0x17, 0xcb, 0xef, 0x23, 0x18, 0xbb,
|
||||
0x99, 0x8c, 0xc1, 0x58, 0x17, 0xad, 0x8c, 0x03, 0x42, 0xe9, 0xcd, 0xe6, 0x30, 0x52, 0x25, 0x59,
|
||||
0x4c, 0xf9, 0x48, 0x95, 0x8e, 0x53, 0xdd, 0x94, 0x7a, 0x37, 0x81, 0xde, 0xec, 0x19, 0x84, 0xbd,
|
||||
0x2d, 0xec, 0xd0, 0xc7, 0x63, 0x5a, 0x25, 0xa2, 0xe5, 0xdf, 0x51, 0x8b, 0xef, 0x20, 0xb6, 0x84,
|
||||
0x59, 0x83, 0x82, 0x2e, 0x70, 0xe1, 0x4c, 0x26, 0x34, 0x60, 0xaf, 0xc7, 0x12, 0x88, 0x84, 0x34,
|
||||
0x56, 0x55, 0x4a, 0x14, 0x56, 0xc6, 0x21, 0x51, 0x7e, 0x6f, 0x39, 0xfb, 0x0e, 0x8d, 0x8d, 0x8f,
|
||||
0x92, 0x60, 0x35, 0xe1, 0xf4, 0x66, 0xcf, 0x61, 0x5e, 0x0c, 0xf6, 0x0a, 0x8d, 0xfa, 0x2a, 0xcd,
|
||||
0x5b, 0x87, 0x1e, 0x13, 0xfa, 0x47, 0x97, 0xad, 0x61, 0x66, 0x06, 0xad, 0x95, 0xae, 0xdd, 0x6a,
|
||||
0x32, 0x9e, 0xd2, 0x8f, 0x3a, 0x7b, 0xf0, 0xd2, 0xc4, 0xe2, 0x7b, 0x1a, 0xb6, 0x82, 0xb1, 0xcb,
|
||||
0x4e, 0x0c, 0xf4, 0xa1, 0xa7, 0x5e, 0xeb, 0xe3, 0xe5, 0x24, 0x1b, 0x5d, 0x21, 0x27, 0xc6, 0x8b,
|
||||
0x1c, 0xa6, 0xf7, 0x43, 0x58, 0x04, 0x47, 0x1f, 0xf4, 0xb5, 0xc6, 0x3b, 0x7d, 0x72, 0xc0, 0x00,
|
||||
0xc2, 0x73, 0x61, 0xd5, 0xad, 0x3c, 0x09, 0xd8, 0x0c, 0x8e, 0x37, 0xba, 0xf0, 0xd5, 0x28, 0xff,
|
||||
0xec, 0x35, 0xe7, 0x6e, 0x0f, 0x76, 0x09, 0xe1, 0x46, 0xdf, 0xe2, 0xb5, 0x64, 0xc9, 0xc3, 0x61,
|
||||
0xf0, 0xa9, 0x5d, 0x3c, 0xfd, 0x07, 0xc3, 0x07, 0x6c, 0x79, 0xb0, 0xce, 0x3e, 0xbd, 0xac, 0x95,
|
||||
0xbd, 0x1a, 0xb6, 0x6e, 0xe3, 0xac, 0x55, 0xc2, 0x60, 0x8f, 0x95, 0xcd, 0x5a, 0x14, 0x99, 0xe9,
|
||||
0x44, 0xf6, 0x4b, 0xee, 0x9f, 0xdb, 0x90, 0xa2, 0xf4, 0xea, 0x47, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||
0xe3, 0x9a, 0x85, 0x54, 0x82, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// NodeAgentClient is the client API for NodeAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type NodeAgentClient interface {
|
||||
Invoke(ctx context.Context, in *NodeRequest, opts ...grpc.CallOption) (*NodeResponse, error)
|
||||
}
|
||||
|
||||
type nodeAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewNodeAgentClient(cc *grpc.ClientConn) NodeAgentClient {
|
||||
return &nodeAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *nodeAgentClient) Invoke(ctx context.Context, in *NodeRequest, opts ...grpc.CallOption) (*NodeResponse, error) {
|
||||
out := new(NodeResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.node.NodeAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// NodeAgentServer is the server API for NodeAgent service.
|
||||
type NodeAgentServer interface {
|
||||
Invoke(context.Context, *NodeRequest) (*NodeResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedNodeAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedNodeAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedNodeAgentServer) Invoke(ctx context.Context, req *NodeRequest) (*NodeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterNodeAgentServer(s *grpc.Server, srv NodeAgentServer) {
|
||||
s.RegisterService(&_NodeAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _NodeAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(NodeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NodeAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.node.NodeAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NodeAgentServer).Invoke(ctx, req.(*NodeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _NodeAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.node.NodeAgent",
|
||||
HandlerType: (*NodeAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _NodeAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "node.proto",
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/cloud";
|
||||
package moc.cloudagent.node;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
import "nodeinfo.proto";
|
||||
|
||||
message NodeRequest {
|
||||
repeated Node Nodes = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message NodeResponse {
|
||||
repeated Node Nodes = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
enum NodeState {
|
||||
Unknown = 0;
|
||||
Active = 1;
|
||||
Inactive = 2;
|
||||
}
|
||||
|
||||
message Node {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
string fqdn = 3;
|
||||
Status status = 4;
|
||||
string locationName = 5;
|
||||
string certificate = 6;
|
||||
int32 port = 7;
|
||||
int32 authorizerPort = 8;
|
||||
NodeState runningState = 9;
|
||||
moc.common.NodeInfo info = 10;
|
||||
}
|
||||
|
||||
service NodeAgent {
|
||||
rpc Invoke(NodeRequest) returns (NodeResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,298 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: subscription.proto
|
||||
|
||||
package cloud
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type SubscriptionRequest struct {
|
||||
Subscriptions []*Subscription `protobuf:"bytes,1,rep,name=Subscriptions,proto3" json:"Subscriptions,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SubscriptionRequest) Reset() { *m = SubscriptionRequest{} }
|
||||
func (m *SubscriptionRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SubscriptionRequest) ProtoMessage() {}
|
||||
func (*SubscriptionRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c4f8ad1a64b2bad6, []int{0}
|
||||
}
|
||||
|
||||
func (m *SubscriptionRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SubscriptionRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SubscriptionRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SubscriptionRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SubscriptionRequest.Merge(m, src)
|
||||
}
|
||||
func (m *SubscriptionRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_SubscriptionRequest.Size(m)
|
||||
}
|
||||
func (m *SubscriptionRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SubscriptionRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SubscriptionRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *SubscriptionRequest) GetSubscriptions() []*Subscription {
|
||||
if m != nil {
|
||||
return m.Subscriptions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SubscriptionRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type SubscriptionResponse struct {
|
||||
Subscriptions []*Subscription `protobuf:"bytes,1,rep,name=Subscriptions,proto3" json:"Subscriptions,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SubscriptionResponse) Reset() { *m = SubscriptionResponse{} }
|
||||
func (m *SubscriptionResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SubscriptionResponse) ProtoMessage() {}
|
||||
func (*SubscriptionResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c4f8ad1a64b2bad6, []int{1}
|
||||
}
|
||||
|
||||
func (m *SubscriptionResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SubscriptionResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SubscriptionResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SubscriptionResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SubscriptionResponse.Merge(m, src)
|
||||
}
|
||||
func (m *SubscriptionResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_SubscriptionResponse.Size(m)
|
||||
}
|
||||
func (m *SubscriptionResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SubscriptionResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SubscriptionResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *SubscriptionResponse) GetSubscriptions() []*Subscription {
|
||||
if m != nil {
|
||||
return m.Subscriptions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SubscriptionResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SubscriptionResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Subscription struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Subscription) Reset() { *m = Subscription{} }
|
||||
func (m *Subscription) String() string { return proto.CompactTextString(m) }
|
||||
func (*Subscription) ProtoMessage() {}
|
||||
func (*Subscription) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c4f8ad1a64b2bad6, []int{2}
|
||||
}
|
||||
|
||||
func (m *Subscription) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Subscription.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Subscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Subscription.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Subscription) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Subscription.Merge(m, src)
|
||||
}
|
||||
func (m *Subscription) XXX_Size() int {
|
||||
return xxx_messageInfo_Subscription.Size(m)
|
||||
}
|
||||
func (m *Subscription) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Subscription.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Subscription proto.InternalMessageInfo
|
||||
|
||||
func (m *Subscription) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Subscription) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Subscription) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*SubscriptionRequest)(nil), "moc.cloudagent.subscription.SubscriptionRequest")
|
||||
proto.RegisterType((*SubscriptionResponse)(nil), "moc.cloudagent.subscription.SubscriptionResponse")
|
||||
proto.RegisterType((*Subscription)(nil), "moc.cloudagent.subscription.Subscription")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("subscription.proto", fileDescriptor_c4f8ad1a64b2bad6) }
|
||||
|
||||
var fileDescriptor_c4f8ad1a64b2bad6 = []byte{
|
||||
// 350 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xcf, 0x4e, 0xe3, 0x30,
|
||||
0x10, 0xc6, 0x37, 0xed, 0x6e, 0xa4, 0x3a, 0x6d, 0xa5, 0xf5, 0xf6, 0x10, 0x65, 0x25, 0x54, 0x85,
|
||||
0x4b, 0x39, 0xe0, 0x40, 0xe0, 0x05, 0xa8, 0xc4, 0x81, 0x53, 0x25, 0x17, 0x81, 0xc4, 0x2d, 0x71,
|
||||
0xdd, 0x10, 0x11, 0x67, 0x8c, 0xff, 0x80, 0xb8, 0xf3, 0x18, 0xbc, 0x04, 0x6f, 0x88, 0xea, 0xb4,
|
||||
0x90, 0x5c, 0x10, 0x48, 0xdc, 0x6c, 0xcf, 0xf7, 0xfd, 0x66, 0xe6, 0x33, 0xc2, 0xda, 0xe6, 0x9a,
|
||||
0xa9, 0x52, 0x9a, 0x12, 0x6a, 0x22, 0x15, 0x18, 0xc0, 0xff, 0x05, 0x30, 0xc2, 0x2a, 0xb0, 0xab,
|
||||
0xac, 0xe0, 0xb5, 0x21, 0x6d, 0x49, 0xb4, 0x57, 0x00, 0x14, 0x15, 0x4f, 0x9c, 0x34, 0xb7, 0xeb,
|
||||
0xe4, 0x51, 0x65, 0x52, 0x72, 0xa5, 0x1b, 0x73, 0x34, 0x64, 0x20, 0xc4, 0x0e, 0x15, 0xbf, 0x78,
|
||||
0xe8, 0xdf, 0xb2, 0x65, 0xa7, 0xfc, 0xde, 0x72, 0x6d, 0xf0, 0x02, 0x8d, 0xda, 0xcf, 0x3a, 0xf4,
|
||||
0xa6, 0xfd, 0x59, 0x90, 0x1e, 0x90, 0x4f, 0x5a, 0x93, 0x0e, 0xa8, 0xeb, 0xc7, 0xa7, 0x68, 0xb4,
|
||||
0x90, 0x5c, 0x65, 0x9b, 0xdb, 0xe5, 0x93, 0xe4, 0x61, 0x6f, 0xea, 0xcd, 0xc6, 0xe9, 0xd8, 0x01,
|
||||
0xdf, 0x2b, 0xb4, 0x2b, 0x8a, 0x5f, 0x3d, 0x34, 0xe9, 0x8e, 0xa7, 0x25, 0xd4, 0x9a, 0xff, 0xfc,
|
||||
0x7c, 0x29, 0xf2, 0x29, 0xd7, 0xb6, 0x32, 0x6e, 0xb0, 0x20, 0x8d, 0x48, 0x93, 0x23, 0xd9, 0xe5,
|
||||
0x48, 0xe6, 0x00, 0xd5, 0x55, 0x56, 0x59, 0x4e, 0xb7, 0x4a, 0x3c, 0x41, 0x7f, 0xce, 0x95, 0x02,
|
||||
0x15, 0xf6, 0xa7, 0xde, 0x6c, 0x40, 0x9b, 0x4b, 0x7c, 0x8d, 0x86, 0x6d, 0x34, 0xc6, 0xe8, 0x77,
|
||||
0x9d, 0x09, 0x1e, 0x7a, 0x4e, 0xe4, 0xce, 0x78, 0x8c, 0x7a, 0xe5, 0xca, 0x75, 0x1a, 0xd0, 0x5e,
|
||||
0xb9, 0xc2, 0xfb, 0xc8, 0xd7, 0x26, 0x33, 0x56, 0x3b, 0x54, 0x90, 0x06, 0x6e, 0x8f, 0xa5, 0x7b,
|
||||
0xa2, 0xdb, 0x52, 0xfa, 0xec, 0xa1, 0xbf, 0x6d, 0xf2, 0xd9, 0x66, 0x43, 0x0c, 0xc8, 0xbf, 0xa8,
|
||||
0x1f, 0xe0, 0x8e, 0xe3, 0xa3, 0xaf, 0x2f, 0xdf, 0xfc, 0x72, 0x74, 0xfc, 0x0d, 0x47, 0x13, 0x7c,
|
||||
0xfc, 0x6b, 0x9e, 0xdc, 0x1c, 0x16, 0xa5, 0xb9, 0xb5, 0x39, 0x61, 0x20, 0x12, 0x51, 0x32, 0x05,
|
||||
0x1a, 0xd6, 0x26, 0x11, 0xc0, 0x12, 0x25, 0x59, 0xf2, 0x81, 0x6b, 0x8e, 0xb9, 0xef, 0x22, 0x3c,
|
||||
0x79, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xa7, 0xb5, 0xe6, 0xfc, 0xcb, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// SubscriptionAgentClient is the client API for SubscriptionAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type SubscriptionAgentClient interface {
|
||||
Invoke(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (*SubscriptionResponse, error)
|
||||
}
|
||||
|
||||
type subscriptionAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewSubscriptionAgentClient(cc *grpc.ClientConn) SubscriptionAgentClient {
|
||||
return &subscriptionAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *subscriptionAgentClient) Invoke(ctx context.Context, in *SubscriptionRequest, opts ...grpc.CallOption) (*SubscriptionResponse, error) {
|
||||
out := new(SubscriptionResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.subscription.SubscriptionAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SubscriptionAgentServer is the server API for SubscriptionAgent service.
|
||||
type SubscriptionAgentServer interface {
|
||||
Invoke(context.Context, *SubscriptionRequest) (*SubscriptionResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedSubscriptionAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedSubscriptionAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedSubscriptionAgentServer) Invoke(ctx context.Context, req *SubscriptionRequest) (*SubscriptionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterSubscriptionAgentServer(s *grpc.Server, srv SubscriptionAgentServer) {
|
||||
s.RegisterService(&_SubscriptionAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _SubscriptionAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SubscriptionRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SubscriptionAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.subscription.SubscriptionAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SubscriptionAgentServer).Invoke(ctx, req.(*SubscriptionRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _SubscriptionAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.subscription.SubscriptionAgent",
|
||||
HandlerType: (*SubscriptionAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _SubscriptionAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "subscription.proto",
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/cloud";
|
||||
package moc.cloudagent.subscription;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
message SubscriptionRequest {
|
||||
repeated Subscription Subscriptions = 1;
|
||||
Operation OperationType = 2;
|
||||
// SubPostOperation PostOperationType = 3;
|
||||
}
|
||||
|
||||
message SubscriptionResponse {
|
||||
repeated Subscription Subscriptions = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message Subscription {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
Status status = 3;
|
||||
}
|
||||
|
||||
service SubscriptionAgent {
|
||||
rpc Invoke(SubscriptionRequest) returns (SubscriptionResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,403 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: galleryimage.proto
|
||||
|
||||
package compute
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type GalleryImageOSType int32
|
||||
|
||||
const (
|
||||
GalleryImageOSType_UNKNOWN GalleryImageOSType = 0
|
||||
GalleryImageOSType_LINUX GalleryImageOSType = 1
|
||||
GalleryImageOSType_WINDOWS GalleryImageOSType = 2
|
||||
)
|
||||
|
||||
var GalleryImageOSType_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "LINUX",
|
||||
2: "WINDOWS",
|
||||
}
|
||||
|
||||
var GalleryImageOSType_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"LINUX": 1,
|
||||
"WINDOWS": 2,
|
||||
}
|
||||
|
||||
func (x GalleryImageOSType) String() string {
|
||||
return proto.EnumName(GalleryImageOSType_name, int32(x))
|
||||
}
|
||||
|
||||
func (GalleryImageOSType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7523a8dbee37a80a, []int{0}
|
||||
}
|
||||
|
||||
type GalleryImageRequest struct {
|
||||
GalleryImages []*GalleryImage `protobuf:"bytes,1,rep,name=GalleryImages,proto3" json:"GalleryImages,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GalleryImageRequest) Reset() { *m = GalleryImageRequest{} }
|
||||
func (m *GalleryImageRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*GalleryImageRequest) ProtoMessage() {}
|
||||
func (*GalleryImageRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7523a8dbee37a80a, []int{0}
|
||||
}
|
||||
|
||||
func (m *GalleryImageRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GalleryImageRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GalleryImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GalleryImageRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *GalleryImageRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GalleryImageRequest.Merge(m, src)
|
||||
}
|
||||
func (m *GalleryImageRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_GalleryImageRequest.Size(m)
|
||||
}
|
||||
func (m *GalleryImageRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GalleryImageRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GalleryImageRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *GalleryImageRequest) GetGalleryImages() []*GalleryImage {
|
||||
if m != nil {
|
||||
return m.GalleryImages
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GalleryImageRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type GalleryImageResponse struct {
|
||||
GalleryImages []*GalleryImage `protobuf:"bytes,1,rep,name=GalleryImages,proto3" json:"GalleryImages,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GalleryImageResponse) Reset() { *m = GalleryImageResponse{} }
|
||||
func (m *GalleryImageResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*GalleryImageResponse) ProtoMessage() {}
|
||||
func (*GalleryImageResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7523a8dbee37a80a, []int{1}
|
||||
}
|
||||
|
||||
func (m *GalleryImageResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GalleryImageResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GalleryImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GalleryImageResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *GalleryImageResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GalleryImageResponse.Merge(m, src)
|
||||
}
|
||||
func (m *GalleryImageResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_GalleryImageResponse.Size(m)
|
||||
}
|
||||
func (m *GalleryImageResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GalleryImageResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GalleryImageResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *GalleryImageResponse) GetGalleryImages() []*GalleryImage {
|
||||
if m != nil {
|
||||
return m.GalleryImages
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GalleryImageResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GalleryImageResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GalleryImage struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
ImageOSType GalleryImageOSType `protobuf:"varint,3,opt,name=imageOSType,proto3,enum=moc.cloudagent.compute.GalleryImageOSType" json:"imageOSType,omitempty"`
|
||||
// Path of the image on the cloud
|
||||
Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
|
||||
LocationName string `protobuf:"bytes,6,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
Publisher string `protobuf:"bytes,7,opt,name=publisher,proto3" json:"publisher,omitempty"`
|
||||
Sku string `protobuf:"bytes,8,opt,name=sku,proto3" json:"sku,omitempty"`
|
||||
Offer string `protobuf:"bytes,9,opt,name=offer,proto3" json:"offer,omitempty"`
|
||||
ContainerName string `protobuf:"bytes,10,opt,name=containerName,proto3" json:"containerName,omitempty"`
|
||||
// Source of the GalleryImage from where we can copy the image from.
|
||||
SourcePath string `protobuf:"bytes,11,opt,name=sourcePath,proto3" json:"sourcePath,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GalleryImage) Reset() { *m = GalleryImage{} }
|
||||
func (m *GalleryImage) String() string { return proto.CompactTextString(m) }
|
||||
func (*GalleryImage) ProtoMessage() {}
|
||||
func (*GalleryImage) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7523a8dbee37a80a, []int{2}
|
||||
}
|
||||
|
||||
func (m *GalleryImage) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GalleryImage.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GalleryImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GalleryImage.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *GalleryImage) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GalleryImage.Merge(m, src)
|
||||
}
|
||||
func (m *GalleryImage) XXX_Size() int {
|
||||
return xxx_messageInfo_GalleryImage.Size(m)
|
||||
}
|
||||
func (m *GalleryImage) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GalleryImage.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GalleryImage proto.InternalMessageInfo
|
||||
|
||||
func (m *GalleryImage) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GalleryImage) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GalleryImage) GetImageOSType() GalleryImageOSType {
|
||||
if m != nil {
|
||||
return m.ImageOSType
|
||||
}
|
||||
return GalleryImageOSType_UNKNOWN
|
||||
}
|
||||
|
||||
func (m *GalleryImage) GetPath() string {
|
||||
if m != nil {
|
||||
return m.Path
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GalleryImage) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *GalleryImage) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GalleryImage) GetPublisher() string {
|
||||
if m != nil {
|
||||
return m.Publisher
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GalleryImage) GetSku() string {
|
||||
if m != nil {
|
||||
return m.Sku
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GalleryImage) GetOffer() string {
|
||||
if m != nil {
|
||||
return m.Offer
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GalleryImage) GetContainerName() string {
|
||||
if m != nil {
|
||||
return m.ContainerName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GalleryImage) GetSourcePath() string {
|
||||
if m != nil {
|
||||
return m.SourcePath
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.cloudagent.compute.GalleryImageOSType", GalleryImageOSType_name, GalleryImageOSType_value)
|
||||
proto.RegisterType((*GalleryImageRequest)(nil), "moc.cloudagent.compute.GalleryImageRequest")
|
||||
proto.RegisterType((*GalleryImageResponse)(nil), "moc.cloudagent.compute.GalleryImageResponse")
|
||||
proto.RegisterType((*GalleryImage)(nil), "moc.cloudagent.compute.GalleryImage")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("galleryimage.proto", fileDescriptor_7523a8dbee37a80a) }
|
||||
|
||||
var fileDescriptor_7523a8dbee37a80a = []byte{
|
||||
// 509 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xdd, 0x6e, 0xd3, 0x60,
|
||||
0x0c, 0x5d, 0xda, 0xad, 0xa3, 0x4e, 0x5b, 0x95, 0x8f, 0x09, 0x45, 0x15, 0x9a, 0xaa, 0xb2, 0x8b,
|
||||
0x6a, 0xa0, 0x44, 0x14, 0x6e, 0xb8, 0x64, 0x02, 0xa1, 0xc2, 0x94, 0xa2, 0x94, 0x51, 0xc4, 0x5d,
|
||||
0x9a, 0xba, 0x69, 0xb4, 0x24, 0x0e, 0xdf, 0x0f, 0x68, 0xbc, 0x08, 0x2f, 0xc1, 0x8b, 0xf1, 0x16,
|
||||
0x28, 0x4e, 0x61, 0x8d, 0xe0, 0xa2, 0x17, 0xdc, 0x7d, 0x3e, 0x3e, 0x3e, 0xb6, 0x4f, 0x1c, 0x10,
|
||||
0x71, 0x98, 0xa6, 0x28, 0x6f, 0x92, 0x2c, 0x8c, 0xd1, 0x2d, 0x24, 0x69, 0x12, 0xf7, 0x33, 0x8a,
|
||||
0xdc, 0x28, 0x25, 0xb3, 0x0a, 0x63, 0xcc, 0xb5, 0x1b, 0x51, 0x56, 0x18, 0x8d, 0x83, 0xd3, 0x98,
|
||||
0x28, 0x4e, 0xd1, 0x63, 0xd6, 0xd2, 0xac, 0xbd, 0xaf, 0x32, 0x2c, 0x0a, 0x94, 0xaa, 0xaa, 0x1b,
|
||||
0x74, 0x22, 0xca, 0x32, 0xca, 0xab, 0x68, 0xf4, 0xdd, 0x82, 0x7b, 0xaf, 0x2b, 0xf1, 0x69, 0x29,
|
||||
0x1e, 0xe0, 0x67, 0x83, 0x4a, 0x8b, 0x37, 0xd0, 0xdd, 0x85, 0x95, 0x63, 0x0d, 0x9b, 0x63, 0x7b,
|
||||
0x72, 0xe6, 0xfe, 0xbb, 0xab, 0x5b, 0xd3, 0xa8, 0x97, 0x8a, 0x67, 0xd0, 0x9d, 0x15, 0x28, 0x43,
|
||||
0x9d, 0x50, 0xfe, 0xfe, 0xa6, 0x40, 0xa7, 0x31, 0xb4, 0xc6, 0xbd, 0x49, 0x8f, 0xb5, 0xfe, 0x64,
|
||||
0x82, 0x3a, 0x69, 0xf4, 0xc3, 0x82, 0x93, 0xfa, 0x64, 0xaa, 0xa0, 0x5c, 0xe1, 0x7f, 0x1d, 0x6d,
|
||||
0x02, 0xad, 0x00, 0x95, 0x49, 0x35, 0xcf, 0x64, 0x4f, 0x06, 0x6e, 0xe5, 0x9e, 0xfb, 0xdb, 0x3d,
|
||||
0xf7, 0x82, 0x28, 0xfd, 0x10, 0xa6, 0x06, 0x83, 0x2d, 0x53, 0x9c, 0xc0, 0xd1, 0x2b, 0x29, 0x49,
|
||||
0x3a, 0xcd, 0xa1, 0x35, 0x6e, 0x07, 0x55, 0x30, 0xfa, 0xd9, 0x80, 0xce, 0xae, 0xb6, 0x10, 0x70,
|
||||
0x98, 0x87, 0x19, 0x3a, 0x16, 0xb3, 0xf8, 0x2d, 0x7a, 0xd0, 0x48, 0x56, 0xdc, 0xaa, 0x1d, 0x34,
|
||||
0x92, 0x95, 0xb8, 0x04, 0x9b, 0x3f, 0xe9, 0x6c, 0xce, 0xbe, 0x34, 0xd9, 0x97, 0xf3, 0x7d, 0x16,
|
||||
0xa9, 0x2a, 0x82, 0xdd, 0xf2, 0xb2, 0x63, 0x11, 0xea, 0x8d, 0x73, 0x58, 0x75, 0x2c, 0xdf, 0xe2,
|
||||
0x21, 0xb4, 0x94, 0x0e, 0xb5, 0x51, 0xce, 0x11, 0x2f, 0x68, 0xb3, 0xf8, 0x9c, 0xa1, 0x60, 0x9b,
|
||||
0x12, 0x23, 0xe8, 0xa4, 0x14, 0xb1, 0xf5, 0x7e, 0x39, 0x72, 0x8b, 0x05, 0x6a, 0x98, 0x78, 0x00,
|
||||
0xed, 0xc2, 0x2c, 0xd3, 0x44, 0x6d, 0x50, 0x3a, 0xc7, 0x4c, 0xb8, 0x05, 0x44, 0x1f, 0x9a, 0xea,
|
||||
0xda, 0x38, 0x77, 0x18, 0x2f, 0x9f, 0xa5, 0x4b, 0xb4, 0x5e, 0xa3, 0x74, 0xda, 0x95, 0x4b, 0x1c,
|
||||
0x88, 0x33, 0xe8, 0x46, 0x94, 0xeb, 0x30, 0xc9, 0x51, 0x72, 0x2b, 0xe0, 0x6c, 0x1d, 0x14, 0xa7,
|
||||
0x00, 0x8a, 0x8c, 0x8c, 0xf0, 0x5d, 0xb9, 0x8e, 0xcd, 0x94, 0x1d, 0xe4, 0xfc, 0x39, 0x88, 0xbf,
|
||||
0xbd, 0x10, 0x36, 0x1c, 0x5f, 0xf9, 0x6f, 0xfd, 0xd9, 0xc2, 0xef, 0x1f, 0x88, 0x36, 0x1c, 0x5d,
|
||||
0x4e, 0xfd, 0xab, 0x8f, 0x7d, 0xab, 0xc4, 0x17, 0x53, 0xff, 0xe5, 0x6c, 0x31, 0xef, 0x37, 0x26,
|
||||
0xdf, 0xe0, 0xee, 0x6e, 0xe9, 0x8b, 0xd2, 0x60, 0x81, 0xd0, 0x9a, 0xe6, 0x5f, 0xe8, 0x1a, 0xc5,
|
||||
0xa3, 0xbd, 0x8e, 0xa8, 0xfa, 0x47, 0x06, 0x8f, 0xf7, 0x23, 0x57, 0x67, 0x3b, 0x3a, 0xb8, 0x78,
|
||||
0xf2, 0xc9, 0x8b, 0x13, 0xbd, 0x31, 0xcb, 0x92, 0xe8, 0x65, 0x49, 0x24, 0x49, 0xd1, 0x5a, 0x7b,
|
||||
0x19, 0x45, 0x9e, 0x2c, 0x22, 0xef, 0x56, 0xc9, 0xdb, 0x2a, 0x2d, 0x5b, 0x7c, 0x87, 0x4f, 0x7f,
|
||||
0x05, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x35, 0xf8, 0x0d, 0x01, 0x04, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// GalleryImageAgentClient is the client API for GalleryImageAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type GalleryImageAgentClient interface {
|
||||
Invoke(ctx context.Context, in *GalleryImageRequest, opts ...grpc.CallOption) (*GalleryImageResponse, error)
|
||||
}
|
||||
|
||||
type galleryImageAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewGalleryImageAgentClient(cc *grpc.ClientConn) GalleryImageAgentClient {
|
||||
return &galleryImageAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *galleryImageAgentClient) Invoke(ctx context.Context, in *GalleryImageRequest, opts ...grpc.CallOption) (*GalleryImageResponse, error) {
|
||||
out := new(GalleryImageResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.compute.GalleryImageAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// GalleryImageAgentServer is the server API for GalleryImageAgent service.
|
||||
type GalleryImageAgentServer interface {
|
||||
Invoke(context.Context, *GalleryImageRequest) (*GalleryImageResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedGalleryImageAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedGalleryImageAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedGalleryImageAgentServer) Invoke(ctx context.Context, req *GalleryImageRequest) (*GalleryImageResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterGalleryImageAgentServer(s *grpc.Server, srv GalleryImageAgentServer) {
|
||||
s.RegisterService(&_GalleryImageAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _GalleryImageAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GalleryImageRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(GalleryImageAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.compute.GalleryImageAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(GalleryImageAgentServer).Invoke(ctx, req.(*GalleryImageRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _GalleryImageAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.compute.GalleryImageAgent",
|
||||
HandlerType: (*GalleryImageAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _GalleryImageAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "galleryimage.proto",
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/compute";
|
||||
package moc.cloudagent.compute;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
enum GalleryImageOSType {
|
||||
UNKNOWN = 0;
|
||||
LINUX = 1;
|
||||
WINDOWS = 2;
|
||||
}
|
||||
|
||||
message GalleryImageRequest {
|
||||
repeated GalleryImage GalleryImages = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message GalleryImageResponse {
|
||||
repeated GalleryImage GalleryImages = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message GalleryImage {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
GalleryImageOSType imageOSType = 3;
|
||||
// Path of the image on the cloud
|
||||
string path = 4;
|
||||
Status status = 5;
|
||||
string locationName = 6;
|
||||
string publisher = 7;
|
||||
string sku = 8;
|
||||
string offer = 9;
|
||||
string containerName = 10;
|
||||
// Source of the GalleryImage from where we can copy the image from.
|
||||
string sourcePath = 11;
|
||||
}
|
||||
|
||||
service GalleryImageAgent {
|
||||
rpc Invoke(GalleryImageRequest) returns (GalleryImageResponse) {}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,109 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/compute";
|
||||
package moc.cloudagent.compute;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
import "computecommon.proto";
|
||||
|
||||
enum VMType {
|
||||
TENANT = 0;
|
||||
LOADBALANCER = 1;
|
||||
STACKEDCONTROLPLANE = 2;
|
||||
}
|
||||
|
||||
message VirtualMachineRequest {
|
||||
repeated VirtualMachine VirtualMachines = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message VirtualMachineResponse {
|
||||
repeated VirtualMachine VirtualMachines = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message SSHPublicKey {
|
||||
string keydata = 1;
|
||||
}
|
||||
|
||||
message Disk {
|
||||
// reference to the virtual hard disk managed by storage
|
||||
string diskname = 1;
|
||||
}
|
||||
|
||||
message StorageConfiguration {
|
||||
Disk osdisk = 1;
|
||||
repeated Disk datadisks = 2;
|
||||
string imageReference = 3;
|
||||
string vmConfigContainerName = 4; // Name of the storage container that hosts the VM configuration file
|
||||
}
|
||||
|
||||
message NetworkInterface {
|
||||
// reference to network interface managed by network
|
||||
string networkInterfaceName = 1;
|
||||
}
|
||||
|
||||
message NetworkConfiguration {
|
||||
repeated NetworkInterface interfaces = 1;
|
||||
}
|
||||
|
||||
message UserConfiguration {
|
||||
string username = 1;
|
||||
string password = 2;
|
||||
UserType usertype = 3;
|
||||
}
|
||||
|
||||
message OperatingSystemConfiguration {
|
||||
string computerName = 1;
|
||||
UserConfiguration administrator = 2;
|
||||
repeated UserConfiguration users = 3;
|
||||
string customData = 4;
|
||||
repeated SSHPublicKey publickeys = 5;
|
||||
OperatingSystemType ostype = 6;
|
||||
}
|
||||
|
||||
message HardwareConfiguration {
|
||||
VirtualMachineSizeType VMSize = 1;
|
||||
}
|
||||
|
||||
message SecurityConfiguration {
|
||||
bool enableTPM = 1;
|
||||
}
|
||||
|
||||
message VirtualMachine {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
StorageConfiguration storage = 3;
|
||||
OperatingSystemConfiguration os = 4;
|
||||
NetworkConfiguration network = 5;
|
||||
string nodeName = 6;
|
||||
string groupName = 7;
|
||||
Status status = 8;
|
||||
string locationName = 9;
|
||||
bool disableHighAvailability = 10;
|
||||
VMType vmType = 11;
|
||||
HardwareConfiguration hardware = 12;
|
||||
repeated string allowedOwnerNodes = 13;
|
||||
PowerState powerState = 14;
|
||||
SecurityConfiguration security = 15;
|
||||
}
|
||||
|
||||
message VirtualMachineOperationRequest {
|
||||
repeated VirtualMachine VirtualMachines = 1;
|
||||
VirtualMachineOperation OperationType = 2;
|
||||
}
|
||||
|
||||
message VirtualMachineOperationResponse {
|
||||
repeated VirtualMachine VirtualMachines = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
service VirtualMachineAgent {
|
||||
rpc Invoke(VirtualMachineRequest) returns (VirtualMachineResponse) {}
|
||||
rpc Operate(VirtualMachineOperationRequest) returns (VirtualMachineOperationResponse) {}
|
||||
}
|
|
@ -0,0 +1,344 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: virtualmachineimage.proto
|
||||
|
||||
package compute
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type VirtualMachineImageRequest struct {
|
||||
VirtualMachineImages []*VirtualMachineImage `protobuf:"bytes,1,rep,name=VirtualMachineImages,proto3" json:"VirtualMachineImages,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImageRequest) Reset() { *m = VirtualMachineImageRequest{} }
|
||||
func (m *VirtualMachineImageRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualMachineImageRequest) ProtoMessage() {}
|
||||
func (*VirtualMachineImageRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_8061d387a83e475c, []int{0}
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImageRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualMachineImageRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualMachineImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualMachineImageRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualMachineImageRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualMachineImageRequest.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualMachineImageRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualMachineImageRequest.Size(m)
|
||||
}
|
||||
func (m *VirtualMachineImageRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualMachineImageRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualMachineImageRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualMachineImageRequest) GetVirtualMachineImages() []*VirtualMachineImage {
|
||||
if m != nil {
|
||||
return m.VirtualMachineImages
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImageRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type VirtualMachineImageResponse struct {
|
||||
VirtualMachineImages []*VirtualMachineImage `protobuf:"bytes,1,rep,name=VirtualMachineImages,proto3" json:"VirtualMachineImages,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImageResponse) Reset() { *m = VirtualMachineImageResponse{} }
|
||||
func (m *VirtualMachineImageResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualMachineImageResponse) ProtoMessage() {}
|
||||
func (*VirtualMachineImageResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_8061d387a83e475c, []int{1}
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImageResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualMachineImageResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualMachineImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualMachineImageResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualMachineImageResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualMachineImageResponse.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualMachineImageResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualMachineImageResponse.Size(m)
|
||||
}
|
||||
func (m *VirtualMachineImageResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualMachineImageResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualMachineImageResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualMachineImageResponse) GetVirtualMachineImages() []*VirtualMachineImage {
|
||||
if m != nil {
|
||||
return m.VirtualMachineImages
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImageResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImageResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type VirtualMachineImage struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
ImageReference string `protobuf:"bytes,3,opt,name=imageReference,proto3" json:"imageReference,omitempty"`
|
||||
Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
|
||||
ContainerName string `protobuf:"bytes,6,opt,name=containerName,proto3" json:"containerName,omitempty"`
|
||||
GroupName string `protobuf:"bytes,18,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
LocationName string `protobuf:"bytes,19,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImage) Reset() { *m = VirtualMachineImage{} }
|
||||
func (m *VirtualMachineImage) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualMachineImage) ProtoMessage() {}
|
||||
func (*VirtualMachineImage) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_8061d387a83e475c, []int{2}
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImage) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualMachineImage.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualMachineImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualMachineImage.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualMachineImage) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualMachineImage.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualMachineImage) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualMachineImage.Size(m)
|
||||
}
|
||||
func (m *VirtualMachineImage) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualMachineImage.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualMachineImage proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualMachineImage) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImage) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImage) GetImageReference() string {
|
||||
if m != nil {
|
||||
return m.ImageReference
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImage) GetPath() string {
|
||||
if m != nil {
|
||||
return m.Path
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImage) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImage) GetContainerName() string {
|
||||
if m != nil {
|
||||
return m.ContainerName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImage) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineImage) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*VirtualMachineImageRequest)(nil), "moc.cloudagent.compute.VirtualMachineImageRequest")
|
||||
proto.RegisterType((*VirtualMachineImageResponse)(nil), "moc.cloudagent.compute.VirtualMachineImageResponse")
|
||||
proto.RegisterType((*VirtualMachineImage)(nil), "moc.cloudagent.compute.VirtualMachineImage")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("virtualmachineimage.proto", fileDescriptor_8061d387a83e475c) }
|
||||
|
||||
var fileDescriptor_8061d387a83e475c = []byte{
|
||||
// 438 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x52, 0xcd, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xc6, 0x69, 0x6b, 0x29, 0x93, 0x36, 0x87, 0x6d, 0x85, 0x8c, 0x41, 0x28, 0x32, 0x08, 0x45,
|
||||
0x42, 0xb2, 0x85, 0xcb, 0x0b, 0x50, 0x89, 0x43, 0x0f, 0x80, 0x64, 0x50, 0x0f, 0x5c, 0xd0, 0x66,
|
||||
0x33, 0x71, 0x56, 0xd8, 0x3b, 0xcb, 0xfe, 0x14, 0x71, 0xe5, 0x05, 0x78, 0x18, 0x5e, 0x82, 0xc7,
|
||||
0x42, 0xde, 0x0d, 0x54, 0x41, 0xbe, 0xe4, 0xc0, 0x6d, 0xf7, 0x9b, 0x6f, 0xbf, 0xef, 0xdb, 0x99,
|
||||
0x81, 0x07, 0xb7, 0xd2, 0x38, 0xcf, 0xbb, 0x9e, 0x8b, 0xad, 0x54, 0x28, 0x7b, 0xde, 0x62, 0xa9,
|
||||
0x0d, 0x39, 0x62, 0xf7, 0x7b, 0x12, 0xa5, 0xe8, 0xc8, 0xaf, 0x79, 0x8b, 0xca, 0x95, 0x82, 0x7a,
|
||||
0xed, 0x1d, 0xe6, 0x8f, 0x5b, 0xa2, 0xb6, 0xc3, 0x2a, 0xb0, 0x56, 0x7e, 0x53, 0x7d, 0x35, 0x5c,
|
||||
0x6b, 0x34, 0x36, 0xbe, 0xcb, 0x4f, 0x05, 0xf5, 0x3d, 0xa9, 0x78, 0x2b, 0x7e, 0x26, 0x90, 0xdf,
|
||||
0x44, 0x8f, 0x37, 0xd1, 0xe3, 0x7a, 0xf0, 0x68, 0xf0, 0x8b, 0x47, 0xeb, 0xd8, 0x27, 0xb8, 0x18,
|
||||
0xa9, 0xda, 0x2c, 0x59, 0x1c, 0x2d, 0x67, 0xf5, 0xf3, 0x72, 0x3c, 0x43, 0x39, 0xa6, 0x38, 0x2a,
|
||||
0xc4, 0x5e, 0xc2, 0xd9, 0x3b, 0x8d, 0x86, 0x3b, 0x49, 0xea, 0xc3, 0x37, 0x8d, 0xd9, 0x64, 0x91,
|
||||
0x2c, 0xe7, 0xf5, 0x3c, 0x28, 0xff, 0xad, 0x34, 0xfb, 0xa4, 0xe2, 0x57, 0x02, 0x0f, 0x47, 0x53,
|
||||
0x5b, 0x4d, 0xca, 0xe2, 0xff, 0x8f, 0x5d, 0x43, 0xda, 0xa0, 0xf5, 0x9d, 0x0b, 0x79, 0x67, 0x75,
|
||||
0x5e, 0xc6, 0xae, 0x97, 0x7f, 0xba, 0x5e, 0x5e, 0x11, 0x75, 0x37, 0xbc, 0xf3, 0xd8, 0xec, 0x98,
|
||||
0xec, 0x02, 0x4e, 0x5e, 0x1b, 0x43, 0x26, 0x3b, 0x5a, 0x24, 0xcb, 0x69, 0x13, 0x2f, 0xc5, 0xf7,
|
||||
0x09, 0x9c, 0x8f, 0x58, 0x30, 0x06, 0xc7, 0x8a, 0xf7, 0x98, 0x25, 0x81, 0x1c, 0xce, 0x6c, 0x0e,
|
||||
0x13, 0xb9, 0x0e, 0x8e, 0xd3, 0x66, 0x22, 0xd7, 0xec, 0x19, 0xcc, 0x65, 0xfc, 0xf7, 0x06, 0x0d,
|
||||
0x2a, 0x81, 0x3b, 0xe9, 0x7f, 0xd0, 0x41, 0x4b, 0x73, 0xb7, 0xcd, 0x8e, 0xa3, 0xd6, 0x70, 0x66,
|
||||
0x4f, 0x20, 0xb5, 0x8e, 0x3b, 0x6f, 0xb3, 0x93, 0xf0, 0x83, 0x59, 0x68, 0xca, 0xfb, 0x00, 0x35,
|
||||
0xbb, 0x12, 0x7b, 0x0a, 0x67, 0x82, 0x94, 0xe3, 0x52, 0xa1, 0x79, 0x3b, 0xa4, 0x49, 0x83, 0xc2,
|
||||
0x3e, 0xc8, 0x1e, 0xc1, 0xb4, 0x35, 0xe4, 0x75, 0x60, 0xb0, 0xc0, 0xb8, 0x03, 0x58, 0x01, 0xa7,
|
||||
0x1d, 0x89, 0x30, 0xbb, 0x40, 0x38, 0x0f, 0x84, 0x3d, 0xac, 0xfe, 0x91, 0x40, 0x36, 0xd2, 0x84,
|
||||
0x57, 0xc3, 0x74, 0x98, 0x85, 0xf4, 0x5a, 0xdd, 0xd2, 0x67, 0x64, 0xf5, 0x21, 0x83, 0x8b, 0x1b,
|
||||
0x9c, 0x5f, 0x1e, 0xf4, 0x26, 0xee, 0x4f, 0x71, 0xef, 0xea, 0xc5, 0xc7, 0xaa, 0x95, 0x6e, 0xeb,
|
||||
0x57, 0x03, 0xbf, 0xea, 0xa5, 0x30, 0x64, 0x69, 0xe3, 0xaa, 0x9e, 0x44, 0x65, 0xb4, 0xa8, 0xee,
|
||||
0x04, 0xab, 0x9d, 0xe0, 0x2a, 0x0d, 0xb3, 0xbf, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x55, 0x17,
|
||||
0x23, 0xcb, 0xb4, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// VirtualMachineImageAgentClient is the client API for VirtualMachineImageAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type VirtualMachineImageAgentClient interface {
|
||||
Invoke(ctx context.Context, in *VirtualMachineImageRequest, opts ...grpc.CallOption) (*VirtualMachineImageResponse, error)
|
||||
}
|
||||
|
||||
type virtualMachineImageAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewVirtualMachineImageAgentClient(cc *grpc.ClientConn) VirtualMachineImageAgentClient {
|
||||
return &virtualMachineImageAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *virtualMachineImageAgentClient) Invoke(ctx context.Context, in *VirtualMachineImageRequest, opts ...grpc.CallOption) (*VirtualMachineImageResponse, error) {
|
||||
out := new(VirtualMachineImageResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.compute.VirtualMachineImageAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// VirtualMachineImageAgentServer is the server API for VirtualMachineImageAgent service.
|
||||
type VirtualMachineImageAgentServer interface {
|
||||
Invoke(context.Context, *VirtualMachineImageRequest) (*VirtualMachineImageResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedVirtualMachineImageAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedVirtualMachineImageAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedVirtualMachineImageAgentServer) Invoke(ctx context.Context, req *VirtualMachineImageRequest) (*VirtualMachineImageResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterVirtualMachineImageAgentServer(s *grpc.Server, srv VirtualMachineImageAgentServer) {
|
||||
s.RegisterService(&_VirtualMachineImageAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _VirtualMachineImageAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(VirtualMachineImageRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VirtualMachineImageAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.compute.VirtualMachineImageAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VirtualMachineImageAgentServer).Invoke(ctx, req.(*VirtualMachineImageRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _VirtualMachineImageAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.compute.VirtualMachineImageAgent",
|
||||
HandlerType: (*VirtualMachineImageAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _VirtualMachineImageAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "virtualmachineimage.proto",
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/compute";
|
||||
package moc.cloudagent.compute;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
message VirtualMachineImageRequest {
|
||||
repeated VirtualMachineImage VirtualMachineImages = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message VirtualMachineImageResponse {
|
||||
repeated VirtualMachineImage VirtualMachineImages = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message VirtualMachineImage {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
string imageReference = 3;
|
||||
string path = 4;
|
||||
Status status = 5;
|
||||
string containerName = 6;
|
||||
string groupName = 18;
|
||||
string locationName = 19;
|
||||
}
|
||||
|
||||
service VirtualMachineImageAgent {
|
||||
rpc Invoke(VirtualMachineImageRequest) returns (VirtualMachineImageResponse) {}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,555 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: virtualmachinescaleset.proto
|
||||
|
||||
package compute
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
network "github.com/microsoft/moc-proto/rpc/cloudagent/network"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type VirtualMachineScaleSetRequest struct {
|
||||
VirtualMachineScaleSetSystems []*VirtualMachineScaleSet `protobuf:"bytes,1,rep,name=VirtualMachineScaleSetSystems,proto3" json:"VirtualMachineScaleSetSystems,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSetRequest) Reset() { *m = VirtualMachineScaleSetRequest{} }
|
||||
func (m *VirtualMachineScaleSetRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualMachineScaleSetRequest) ProtoMessage() {}
|
||||
func (*VirtualMachineScaleSetRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d2ef1a2fddc3eb6a, []int{0}
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSetRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualMachineScaleSetRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualMachineScaleSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualMachineScaleSetRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualMachineScaleSetRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualMachineScaleSetRequest.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualMachineScaleSetRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualMachineScaleSetRequest.Size(m)
|
||||
}
|
||||
func (m *VirtualMachineScaleSetRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualMachineScaleSetRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualMachineScaleSetRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualMachineScaleSetRequest) GetVirtualMachineScaleSetSystems() []*VirtualMachineScaleSet {
|
||||
if m != nil {
|
||||
return m.VirtualMachineScaleSetSystems
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSetRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type VirtualMachineScaleSetResponse struct {
|
||||
VirtualMachineScaleSetSystems []*VirtualMachineScaleSet `protobuf:"bytes,1,rep,name=VirtualMachineScaleSetSystems,proto3" json:"VirtualMachineScaleSetSystems,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSetResponse) Reset() { *m = VirtualMachineScaleSetResponse{} }
|
||||
func (m *VirtualMachineScaleSetResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualMachineScaleSetResponse) ProtoMessage() {}
|
||||
func (*VirtualMachineScaleSetResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d2ef1a2fddc3eb6a, []int{1}
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSetResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualMachineScaleSetResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualMachineScaleSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualMachineScaleSetResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualMachineScaleSetResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualMachineScaleSetResponse.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualMachineScaleSetResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualMachineScaleSetResponse.Size(m)
|
||||
}
|
||||
func (m *VirtualMachineScaleSetResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualMachineScaleSetResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualMachineScaleSetResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualMachineScaleSetResponse) GetVirtualMachineScaleSetSystems() []*VirtualMachineScaleSet {
|
||||
if m != nil {
|
||||
return m.VirtualMachineScaleSetSystems
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSetResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSetResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Sku struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Capacity int64 `protobuf:"varint,2,opt,name=capacity,proto3" json:"capacity,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Sku) Reset() { *m = Sku{} }
|
||||
func (m *Sku) String() string { return proto.CompactTextString(m) }
|
||||
func (*Sku) ProtoMessage() {}
|
||||
func (*Sku) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d2ef1a2fddc3eb6a, []int{2}
|
||||
}
|
||||
|
||||
func (m *Sku) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Sku.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Sku) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Sku.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Sku) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Sku.Merge(m, src)
|
||||
}
|
||||
func (m *Sku) XXX_Size() int {
|
||||
return xxx_messageInfo_Sku.Size(m)
|
||||
}
|
||||
func (m *Sku) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Sku.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Sku proto.InternalMessageInfo
|
||||
|
||||
func (m *Sku) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Sku) GetCapacity() int64 {
|
||||
if m != nil {
|
||||
return m.Capacity
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type NetworkConfigurationScaleSet struct {
|
||||
Interfaces []*network.NetworkInterface `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NetworkConfigurationScaleSet) Reset() { *m = NetworkConfigurationScaleSet{} }
|
||||
func (m *NetworkConfigurationScaleSet) String() string { return proto.CompactTextString(m) }
|
||||
func (*NetworkConfigurationScaleSet) ProtoMessage() {}
|
||||
func (*NetworkConfigurationScaleSet) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d2ef1a2fddc3eb6a, []int{3}
|
||||
}
|
||||
|
||||
func (m *NetworkConfigurationScaleSet) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NetworkConfigurationScaleSet.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NetworkConfigurationScaleSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NetworkConfigurationScaleSet.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NetworkConfigurationScaleSet) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NetworkConfigurationScaleSet.Merge(m, src)
|
||||
}
|
||||
func (m *NetworkConfigurationScaleSet) XXX_Size() int {
|
||||
return xxx_messageInfo_NetworkConfigurationScaleSet.Size(m)
|
||||
}
|
||||
func (m *NetworkConfigurationScaleSet) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NetworkConfigurationScaleSet.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NetworkConfigurationScaleSet proto.InternalMessageInfo
|
||||
|
||||
func (m *NetworkConfigurationScaleSet) GetInterfaces() []*network.NetworkInterface {
|
||||
if m != nil {
|
||||
return m.Interfaces
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type VirtualMachineProfile struct {
|
||||
Vmprefix string `protobuf:"bytes,1,opt,name=vmprefix,proto3" json:"vmprefix,omitempty"`
|
||||
Network *NetworkConfigurationScaleSet `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"`
|
||||
Storage *StorageConfiguration `protobuf:"bytes,3,opt,name=storage,proto3" json:"storage,omitempty"`
|
||||
Os *OperatingSystemConfiguration `protobuf:"bytes,4,opt,name=os,proto3" json:"os,omitempty"`
|
||||
Hardware *HardwareConfiguration `protobuf:"bytes,5,opt,name=hardware,proto3" json:"hardware,omitempty"`
|
||||
Security *SecurityConfiguration `protobuf:"bytes,6,opt,name=security,proto3" json:"security,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualMachineProfile) Reset() { *m = VirtualMachineProfile{} }
|
||||
func (m *VirtualMachineProfile) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualMachineProfile) ProtoMessage() {}
|
||||
func (*VirtualMachineProfile) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d2ef1a2fddc3eb6a, []int{4}
|
||||
}
|
||||
|
||||
func (m *VirtualMachineProfile) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualMachineProfile.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualMachineProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualMachineProfile.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualMachineProfile) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualMachineProfile.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualMachineProfile) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualMachineProfile.Size(m)
|
||||
}
|
||||
func (m *VirtualMachineProfile) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualMachineProfile.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualMachineProfile proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualMachineProfile) GetVmprefix() string {
|
||||
if m != nil {
|
||||
return m.Vmprefix
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineProfile) GetNetwork() *NetworkConfigurationScaleSet {
|
||||
if m != nil {
|
||||
return m.Network
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineProfile) GetStorage() *StorageConfiguration {
|
||||
if m != nil {
|
||||
return m.Storage
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineProfile) GetOs() *OperatingSystemConfiguration {
|
||||
if m != nil {
|
||||
return m.Os
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineProfile) GetHardware() *HardwareConfiguration {
|
||||
if m != nil {
|
||||
return m.Hardware
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineProfile) GetSecurity() *SecurityConfiguration {
|
||||
if m != nil {
|
||||
return m.Security
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type VirtualMachineScaleSet struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Sku *Sku `protobuf:"bytes,3,opt,name=sku,proto3" json:"sku,omitempty"`
|
||||
Virtualmachineprofile *VirtualMachineProfile `protobuf:"bytes,4,opt,name=virtualmachineprofile,proto3" json:"virtualmachineprofile,omitempty"`
|
||||
VirtualMachineSystems []*VirtualMachine `protobuf:"bytes,5,rep,name=VirtualMachineSystems,proto3" json:"VirtualMachineSystems,omitempty"`
|
||||
Nodefqdn string `protobuf:"bytes,6,opt,name=nodefqdn,proto3" json:"nodefqdn,omitempty"`
|
||||
GroupName string `protobuf:"bytes,7,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
LocationName string `protobuf:"bytes,8,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"`
|
||||
DisableHighAvailability bool `protobuf:"varint,11,opt,name=disableHighAvailability,proto3" json:"disableHighAvailability,omitempty"`
|
||||
AllowedOwnerNodes []string `protobuf:"bytes,12,rep,name=allowedOwnerNodes,proto3" json:"allowedOwnerNodes,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) Reset() { *m = VirtualMachineScaleSet{} }
|
||||
func (m *VirtualMachineScaleSet) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualMachineScaleSet) ProtoMessage() {}
|
||||
func (*VirtualMachineScaleSet) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d2ef1a2fddc3eb6a, []int{5}
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualMachineScaleSet.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualMachineScaleSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualMachineScaleSet.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualMachineScaleSet) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualMachineScaleSet.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualMachineScaleSet) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualMachineScaleSet.Size(m)
|
||||
}
|
||||
func (m *VirtualMachineScaleSet) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualMachineScaleSet.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualMachineScaleSet proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualMachineScaleSet) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) GetSku() *Sku {
|
||||
if m != nil {
|
||||
return m.Sku
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) GetVirtualmachineprofile() *VirtualMachineProfile {
|
||||
if m != nil {
|
||||
return m.Virtualmachineprofile
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) GetVirtualMachineSystems() []*VirtualMachine {
|
||||
if m != nil {
|
||||
return m.VirtualMachineSystems
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) GetNodefqdn() string {
|
||||
if m != nil {
|
||||
return m.Nodefqdn
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) GetDisableHighAvailability() bool {
|
||||
if m != nil {
|
||||
return m.DisableHighAvailability
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *VirtualMachineScaleSet) GetAllowedOwnerNodes() []string {
|
||||
if m != nil {
|
||||
return m.AllowedOwnerNodes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*VirtualMachineScaleSetRequest)(nil), "moc.cloudagent.compute.VirtualMachineScaleSetRequest")
|
||||
proto.RegisterType((*VirtualMachineScaleSetResponse)(nil), "moc.cloudagent.compute.VirtualMachineScaleSetResponse")
|
||||
proto.RegisterType((*Sku)(nil), "moc.cloudagent.compute.Sku")
|
||||
proto.RegisterType((*NetworkConfigurationScaleSet)(nil), "moc.cloudagent.compute.NetworkConfigurationScaleSet")
|
||||
proto.RegisterType((*VirtualMachineProfile)(nil), "moc.cloudagent.compute.VirtualMachineProfile")
|
||||
proto.RegisterType((*VirtualMachineScaleSet)(nil), "moc.cloudagent.compute.VirtualMachineScaleSet")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("virtualmachinescaleset.proto", fileDescriptor_d2ef1a2fddc3eb6a) }
|
||||
|
||||
var fileDescriptor_d2ef1a2fddc3eb6a = []byte{
|
||||
// 728 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0xcd, 0x4e, 0xdb, 0x4a,
|
||||
0x18, 0xbd, 0x4e, 0x20, 0x24, 0x13, 0x2e, 0xd2, 0x1d, 0x01, 0xd7, 0x0a, 0x14, 0x45, 0xae, 0x54,
|
||||
0x65, 0x01, 0xb6, 0x9a, 0x42, 0xd5, 0x2d, 0xf4, 0x47, 0xb0, 0x68, 0xa8, 0x26, 0x15, 0x8b, 0xaa,
|
||||
0x9b, 0x89, 0x3d, 0x71, 0x46, 0xb1, 0x3d, 0x66, 0x7e, 0x92, 0xe6, 0x4d, 0xda, 0x27, 0xe8, 0xc3,
|
||||
0xf4, 0x25, 0xfa, 0x28, 0x95, 0xc7, 0xe3, 0x50, 0xd3, 0x38, 0x82, 0x55, 0x77, 0x99, 0xf9, 0xce,
|
||||
0x39, 0xf3, 0xcd, 0xf9, 0x8e, 0x27, 0xe0, 0x70, 0x46, 0xb9, 0x54, 0x38, 0x8a, 0xb1, 0x3f, 0xa1,
|
||||
0x09, 0x11, 0x3e, 0x8e, 0x88, 0x20, 0xd2, 0x4d, 0x39, 0x93, 0x0c, 0xee, 0xc7, 0xcc, 0x77, 0xfd,
|
||||
0x88, 0xa9, 0x00, 0x87, 0x24, 0x91, 0xae, 0xcf, 0xe2, 0x54, 0x49, 0xd2, 0x39, 0x0a, 0x19, 0x0b,
|
||||
0x23, 0xe2, 0x69, 0xd4, 0x48, 0x8d, 0xbd, 0x39, 0xc7, 0x69, 0x4a, 0xb8, 0xc8, 0x79, 0x9d, 0xdd,
|
||||
0xb2, 0xaa, 0xd9, 0xdd, 0xf6, 0x59, 0x1c, 0xb3, 0xc4, 0xac, 0xf6, 0x13, 0x22, 0xe7, 0x8c, 0x4f,
|
||||
0x69, 0x22, 0x09, 0x1f, 0x63, 0xdf, 0xa0, 0x9c, 0x1f, 0x16, 0x78, 0x72, 0x93, 0xd3, 0xdf, 0xe7,
|
||||
0xf4, 0x61, 0xd6, 0xd4, 0x90, 0x48, 0x44, 0x6e, 0x15, 0x11, 0x12, 0xca, 0x2a, 0xc0, 0x70, 0x21,
|
||||
0x24, 0x89, 0x85, 0x6d, 0x75, 0xeb, 0xbd, 0x76, 0xdf, 0x75, 0x57, 0x77, 0xef, 0x56, 0xa8, 0xaf,
|
||||
0x17, 0x85, 0xa7, 0xe0, 0xdf, 0xeb, 0x94, 0x70, 0x2c, 0x29, 0x4b, 0x3e, 0x2e, 0x52, 0x62, 0xd7,
|
||||
0xba, 0x56, 0x6f, 0xa7, 0xbf, 0xa3, 0x4f, 0x59, 0x56, 0x50, 0x19, 0xe4, 0xfc, 0xb4, 0xc0, 0x51,
|
||||
0xd5, 0x6d, 0x44, 0xca, 0x12, 0x41, 0xfe, 0xd2, 0x75, 0xfa, 0xa0, 0x81, 0x88, 0x50, 0x91, 0xd4,
|
||||
0xf7, 0x68, 0xf7, 0x3b, 0x6e, 0x3e, 0x53, 0xb7, 0x98, 0xa9, 0x7b, 0xc1, 0x58, 0x74, 0x83, 0x23,
|
||||
0x45, 0x90, 0x41, 0xc2, 0x5d, 0xb0, 0xf9, 0x96, 0x73, 0xc6, 0xed, 0x7a, 0xd7, 0xea, 0xb5, 0x50,
|
||||
0xbe, 0x70, 0xce, 0x40, 0x7d, 0x38, 0x55, 0x10, 0x82, 0x8d, 0x04, 0xc7, 0xc4, 0xb6, 0x74, 0x4d,
|
||||
0xff, 0x86, 0x1d, 0xd0, 0xf4, 0x71, 0x8a, 0x7d, 0x2a, 0x17, 0xfa, 0x98, 0x3a, 0x5a, 0xae, 0x9d,
|
||||
0x09, 0x38, 0x1c, 0xe4, 0x09, 0x78, 0xcd, 0x92, 0x31, 0x0d, 0x55, 0xee, 0x5a, 0xd1, 0x27, 0xbc,
|
||||
0x04, 0x60, 0x19, 0x8d, 0xc2, 0x83, 0xde, 0x7d, 0x0f, 0x4c, 0x86, 0x5c, 0xa3, 0x74, 0x55, 0x10,
|
||||
0xd0, 0x6f, 0x5c, 0xe7, 0x7b, 0x1d, 0xec, 0x95, 0xcd, 0xf8, 0xc0, 0xd9, 0x98, 0x46, 0xba, 0xbf,
|
||||
0x59, 0x9c, 0x72, 0x32, 0xa6, 0x5f, 0x4c, 0xdf, 0xcb, 0x35, 0x1c, 0x80, 0x2d, 0xa3, 0x6e, 0x1c,
|
||||
0x3a, 0xad, 0x1a, 0xc0, 0xba, 0x6b, 0xa0, 0x42, 0x04, 0xbe, 0x03, 0x5b, 0x42, 0x32, 0x8e, 0x43,
|
||||
0xa2, 0xed, 0x6b, 0xf7, 0x8f, 0xab, 0xf4, 0x86, 0x39, 0xac, 0xa4, 0x87, 0x0a, 0x32, 0x7c, 0x03,
|
||||
0x6a, 0x4c, 0xd8, 0x1b, 0xeb, 0x5b, 0x32, 0x21, 0x4c, 0xc2, 0x7c, 0xdc, 0x65, 0xa9, 0x1a, 0x13,
|
||||
0xf0, 0x0a, 0x34, 0x27, 0x98, 0x07, 0x73, 0xcc, 0x89, 0xbd, 0xa9, 0xb5, 0x4e, 0xaa, 0xb4, 0x2e,
|
||||
0x0d, 0xae, 0x2c, 0xb2, 0xa4, 0x67, 0x52, 0x82, 0xf8, 0x8a, 0x67, 0x43, 0x6e, 0xac, 0x97, 0x1a,
|
||||
0x1a, 0xdc, 0x3d, 0xa9, 0x82, 0xee, 0x7c, 0xdb, 0x00, 0xfb, 0xab, 0x63, 0xbb, 0x32, 0x5e, 0x3b,
|
||||
0xa0, 0x46, 0x03, 0x3d, 0x9d, 0x16, 0xaa, 0xd1, 0x00, 0x9e, 0x80, 0xba, 0x98, 0x2a, 0x63, 0xef,
|
||||
0x41, 0x65, 0x13, 0x53, 0x85, 0x32, 0x1c, 0xf4, 0xc1, 0x5e, 0xf9, 0x9d, 0x4a, 0xf3, 0x58, 0x18,
|
||||
0x73, 0x4f, 0x1e, 0xf6, 0xc1, 0x99, 0x2c, 0xa1, 0xd5, 0x5a, 0xf0, 0xf3, 0xfd, 0xec, 0x15, 0x5f,
|
||||
0xf5, 0xa6, 0x4e, 0xf4, 0xb3, 0x87, 0x1d, 0x82, 0x56, 0x8b, 0x64, 0x01, 0x4e, 0x58, 0x40, 0xc6,
|
||||
0xb7, 0x41, 0xa2, 0xbd, 0x6f, 0xa1, 0xe5, 0x1a, 0x1e, 0x82, 0x56, 0xc8, 0x99, 0x4a, 0x07, 0x99,
|
||||
0x6d, 0x5b, 0xba, 0x78, 0xb7, 0x01, 0x1d, 0xb0, 0x1d, 0x31, 0x5f, 0x0f, 0x40, 0x03, 0x9a, 0x1a,
|
||||
0x50, 0xda, 0x83, 0x4f, 0x41, 0x43, 0x48, 0x2c, 0x95, 0xb0, 0x5b, 0xda, 0x91, 0xb6, 0x6e, 0x76,
|
||||
0xa8, 0xb7, 0x90, 0x29, 0xc1, 0x57, 0xe0, 0xff, 0x80, 0x0a, 0x3c, 0x8a, 0xc8, 0x25, 0x0d, 0x27,
|
||||
0xe7, 0x33, 0x4c, 0x23, 0x3c, 0xa2, 0x51, 0x96, 0x86, 0x76, 0xd7, 0xea, 0x35, 0x51, 0x55, 0x19,
|
||||
0x1e, 0x83, 0xff, 0x70, 0x14, 0xb1, 0x39, 0x09, 0xae, 0xe7, 0x09, 0xe1, 0x03, 0x16, 0x10, 0x61,
|
||||
0x6f, 0x77, 0xeb, 0xbd, 0x16, 0xfa, 0xb3, 0xd0, 0xff, 0x6a, 0x81, 0x83, 0xd5, 0xd9, 0x38, 0xcf,
|
||||
0x8c, 0x83, 0x0b, 0xd0, 0xb8, 0x4a, 0x66, 0x6c, 0x4a, 0xe0, 0xd9, 0x23, 0x5f, 0xca, 0xfc, 0x6f,
|
||||
0xa5, 0xf3, 0xf2, 0xb1, 0xb4, 0xfc, 0xfd, 0x76, 0xfe, 0xb9, 0x78, 0xfe, 0xc9, 0x0b, 0xa9, 0x9c,
|
||||
0xa8, 0x51, 0x46, 0xf1, 0x62, 0xea, 0x73, 0x26, 0xd8, 0x58, 0x7a, 0x31, 0xf3, 0x3d, 0x9e, 0xfa,
|
||||
0xde, 0x9d, 0xa6, 0x67, 0x34, 0x47, 0x0d, 0xfd, 0xcc, 0xbe, 0xf8, 0x15, 0x00, 0x00, 0xff, 0xff,
|
||||
0xc2, 0x31, 0x79, 0xdb, 0x80, 0x07, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// VirtualMachineScaleSetAgentClient is the client API for VirtualMachineScaleSetAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type VirtualMachineScaleSetAgentClient interface {
|
||||
Invoke(ctx context.Context, in *VirtualMachineScaleSetRequest, opts ...grpc.CallOption) (*VirtualMachineScaleSetResponse, error)
|
||||
}
|
||||
|
||||
type virtualMachineScaleSetAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewVirtualMachineScaleSetAgentClient(cc *grpc.ClientConn) VirtualMachineScaleSetAgentClient {
|
||||
return &virtualMachineScaleSetAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *virtualMachineScaleSetAgentClient) Invoke(ctx context.Context, in *VirtualMachineScaleSetRequest, opts ...grpc.CallOption) (*VirtualMachineScaleSetResponse, error) {
|
||||
out := new(VirtualMachineScaleSetResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.compute.VirtualMachineScaleSetAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// VirtualMachineScaleSetAgentServer is the server API for VirtualMachineScaleSetAgent service.
|
||||
type VirtualMachineScaleSetAgentServer interface {
|
||||
Invoke(context.Context, *VirtualMachineScaleSetRequest) (*VirtualMachineScaleSetResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedVirtualMachineScaleSetAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedVirtualMachineScaleSetAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedVirtualMachineScaleSetAgentServer) Invoke(ctx context.Context, req *VirtualMachineScaleSetRequest) (*VirtualMachineScaleSetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterVirtualMachineScaleSetAgentServer(s *grpc.Server, srv VirtualMachineScaleSetAgentServer) {
|
||||
s.RegisterService(&_VirtualMachineScaleSetAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _VirtualMachineScaleSetAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(VirtualMachineScaleSetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VirtualMachineScaleSetAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.compute.VirtualMachineScaleSetAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VirtualMachineScaleSetAgentServer).Invoke(ctx, req.(*VirtualMachineScaleSetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _VirtualMachineScaleSetAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.compute.VirtualMachineScaleSetAgent",
|
||||
HandlerType: (*VirtualMachineScaleSetAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _VirtualMachineScaleSetAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "virtualmachinescaleset.proto",
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/compute";
|
||||
package moc.cloudagent.compute;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "virtualmachine.proto";
|
||||
import "common.proto";
|
||||
import "networkinterface.proto";
|
||||
|
||||
message VirtualMachineScaleSetRequest {
|
||||
repeated VirtualMachineScaleSet VirtualMachineScaleSetSystems = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message VirtualMachineScaleSetResponse {
|
||||
repeated VirtualMachineScaleSet VirtualMachineScaleSetSystems = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message Sku {
|
||||
string name = 1;
|
||||
int64 capacity = 2;
|
||||
}
|
||||
|
||||
message NetworkConfigurationScaleSet {
|
||||
repeated moc.cloudagent.network.NetworkInterface interfaces = 1;
|
||||
}
|
||||
|
||||
message VirtualMachineProfile {
|
||||
string vmprefix = 1;
|
||||
NetworkConfigurationScaleSet network = 2;
|
||||
StorageConfiguration storage = 3;
|
||||
OperatingSystemConfiguration os = 4;
|
||||
HardwareConfiguration hardware = 5;
|
||||
SecurityConfiguration security = 6;
|
||||
}
|
||||
|
||||
message VirtualMachineScaleSet {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
Sku sku = 3;
|
||||
VirtualMachineProfile virtualmachineprofile = 4;
|
||||
repeated VirtualMachine VirtualMachineSystems = 5;
|
||||
string nodefqdn = 6;
|
||||
string groupName = 7;
|
||||
string locationName = 8;
|
||||
Status status = 9;
|
||||
bool disableHighAvailability = 11;
|
||||
repeated string allowedOwnerNodes = 12;
|
||||
}
|
||||
|
||||
service VirtualMachineScaleSetAgent {
|
||||
rpc Invoke(VirtualMachineScaleSetRequest) returns (VirtualMachineScaleSetResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,422 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: loadbalancer.proto
|
||||
|
||||
package network
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type LoadBalancerRequest struct {
|
||||
LoadBalancers []*LoadBalancer `protobuf:"bytes,1,rep,name=LoadBalancers,proto3" json:"LoadBalancers,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LoadBalancerRequest) Reset() { *m = LoadBalancerRequest{} }
|
||||
func (m *LoadBalancerRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LoadBalancerRequest) ProtoMessage() {}
|
||||
func (*LoadBalancerRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d60ee00bafda1595, []int{0}
|
||||
}
|
||||
|
||||
func (m *LoadBalancerRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LoadBalancerRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LoadBalancerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LoadBalancerRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LoadBalancerRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LoadBalancerRequest.Merge(m, src)
|
||||
}
|
||||
func (m *LoadBalancerRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_LoadBalancerRequest.Size(m)
|
||||
}
|
||||
func (m *LoadBalancerRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LoadBalancerRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LoadBalancerRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *LoadBalancerRequest) GetLoadBalancers() []*LoadBalancer {
|
||||
if m != nil {
|
||||
return m.LoadBalancers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LoadBalancerRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type LoadBalancerResponse struct {
|
||||
LoadBalancers []*LoadBalancer `protobuf:"bytes,1,rep,name=LoadBalancers,proto3" json:"LoadBalancers,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LoadBalancerResponse) Reset() { *m = LoadBalancerResponse{} }
|
||||
func (m *LoadBalancerResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LoadBalancerResponse) ProtoMessage() {}
|
||||
func (*LoadBalancerResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d60ee00bafda1595, []int{1}
|
||||
}
|
||||
|
||||
func (m *LoadBalancerResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LoadBalancerResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LoadBalancerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LoadBalancerResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LoadBalancerResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LoadBalancerResponse.Merge(m, src)
|
||||
}
|
||||
func (m *LoadBalancerResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_LoadBalancerResponse.Size(m)
|
||||
}
|
||||
func (m *LoadBalancerResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LoadBalancerResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LoadBalancerResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *LoadBalancerResponse) GetLoadBalancers() []*LoadBalancer {
|
||||
if m != nil {
|
||||
return m.LoadBalancers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LoadBalancerResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LoadBalancerResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LoadBalancingRule struct {
|
||||
FrontendPort uint32 `protobuf:"varint,1,opt,name=frontendPort,proto3" json:"frontendPort,omitempty"`
|
||||
BackendPort uint32 `protobuf:"varint,2,opt,name=backendPort,proto3" json:"backendPort,omitempty"`
|
||||
Protocol common.Protocol `protobuf:"varint,3,opt,name=protocol,proto3,enum=moc.Protocol" json:"protocol,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LoadBalancingRule) Reset() { *m = LoadBalancingRule{} }
|
||||
func (m *LoadBalancingRule) String() string { return proto.CompactTextString(m) }
|
||||
func (*LoadBalancingRule) ProtoMessage() {}
|
||||
func (*LoadBalancingRule) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d60ee00bafda1595, []int{2}
|
||||
}
|
||||
|
||||
func (m *LoadBalancingRule) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LoadBalancingRule.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LoadBalancingRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LoadBalancingRule.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LoadBalancingRule) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LoadBalancingRule.Merge(m, src)
|
||||
}
|
||||
func (m *LoadBalancingRule) XXX_Size() int {
|
||||
return xxx_messageInfo_LoadBalancingRule.Size(m)
|
||||
}
|
||||
func (m *LoadBalancingRule) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LoadBalancingRule.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LoadBalancingRule proto.InternalMessageInfo
|
||||
|
||||
func (m *LoadBalancingRule) GetFrontendPort() uint32 {
|
||||
if m != nil {
|
||||
return m.FrontendPort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *LoadBalancingRule) GetBackendPort() uint32 {
|
||||
if m != nil {
|
||||
return m.BackendPort
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *LoadBalancingRule) GetProtocol() common.Protocol {
|
||||
if m != nil {
|
||||
return m.Protocol
|
||||
}
|
||||
return common.Protocol_All
|
||||
}
|
||||
|
||||
type LoadBalancer struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
FrontendIP string `protobuf:"bytes,3,opt,name=frontendIP,proto3" json:"frontendIP,omitempty"`
|
||||
Backendpoolnames []string `protobuf:"bytes,4,rep,name=backendpoolnames,proto3" json:"backendpoolnames,omitempty"`
|
||||
Networkid string `protobuf:"bytes,5,opt,name=networkid,proto3" json:"networkid,omitempty"`
|
||||
Loadbalancingrules []*LoadBalancingRule `protobuf:"bytes,6,rep,name=loadbalancingrules,proto3" json:"loadbalancingrules,omitempty"`
|
||||
Nodefqdn string `protobuf:"bytes,7,opt,name=nodefqdn,proto3" json:"nodefqdn,omitempty"`
|
||||
GroupName string `protobuf:"bytes,8,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
LocationName string `protobuf:"bytes,9,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LoadBalancer) Reset() { *m = LoadBalancer{} }
|
||||
func (m *LoadBalancer) String() string { return proto.CompactTextString(m) }
|
||||
func (*LoadBalancer) ProtoMessage() {}
|
||||
func (*LoadBalancer) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d60ee00bafda1595, []int{3}
|
||||
}
|
||||
|
||||
func (m *LoadBalancer) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LoadBalancer.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LoadBalancer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LoadBalancer.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LoadBalancer) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LoadBalancer.Merge(m, src)
|
||||
}
|
||||
func (m *LoadBalancer) XXX_Size() int {
|
||||
return xxx_messageInfo_LoadBalancer.Size(m)
|
||||
}
|
||||
func (m *LoadBalancer) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LoadBalancer.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LoadBalancer proto.InternalMessageInfo
|
||||
|
||||
func (m *LoadBalancer) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LoadBalancer) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LoadBalancer) GetFrontendIP() string {
|
||||
if m != nil {
|
||||
return m.FrontendIP
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LoadBalancer) GetBackendpoolnames() []string {
|
||||
if m != nil {
|
||||
return m.Backendpoolnames
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LoadBalancer) GetNetworkid() string {
|
||||
if m != nil {
|
||||
return m.Networkid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LoadBalancer) GetLoadbalancingrules() []*LoadBalancingRule {
|
||||
if m != nil {
|
||||
return m.Loadbalancingrules
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LoadBalancer) GetNodefqdn() string {
|
||||
if m != nil {
|
||||
return m.Nodefqdn
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LoadBalancer) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LoadBalancer) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LoadBalancer) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*LoadBalancerRequest)(nil), "moc.cloudagent.network.LoadBalancerRequest")
|
||||
proto.RegisterType((*LoadBalancerResponse)(nil), "moc.cloudagent.network.LoadBalancerResponse")
|
||||
proto.RegisterType((*LoadBalancingRule)(nil), "moc.cloudagent.network.LoadBalancingRule")
|
||||
proto.RegisterType((*LoadBalancer)(nil), "moc.cloudagent.network.LoadBalancer")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("loadbalancer.proto", fileDescriptor_d60ee00bafda1595) }
|
||||
|
||||
var fileDescriptor_d60ee00bafda1595 = []byte{
|
||||
// 532 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x4d, 0x8f, 0xd3, 0x30,
|
||||
0x10, 0x25, 0xed, 0x6e, 0x69, 0xa6, 0x1f, 0x02, 0xef, 0x0a, 0x45, 0x15, 0x5a, 0x45, 0x81, 0x43,
|
||||
0x17, 0x50, 0x22, 0x02, 0x7f, 0x80, 0x4a, 0x1c, 0x16, 0x21, 0xa8, 0x0c, 0x42, 0x82, 0x5b, 0x9a,
|
||||
0xb8, 0x21, 0xaa, 0xe3, 0xc9, 0xda, 0x0e, 0x2b, 0x38, 0xf3, 0x1f, 0xf8, 0x13, 0xfc, 0x42, 0x4e,
|
||||
0xa8, 0x8e, 0xdb, 0x26, 0x62, 0x25, 0xf6, 0xb0, 0xb7, 0xf8, 0xf9, 0xf9, 0xcd, 0x9b, 0x99, 0x17,
|
||||
0x20, 0x1c, 0x93, 0x6c, 0x95, 0xf0, 0x44, 0xa4, 0x4c, 0x86, 0x95, 0x44, 0x8d, 0xe4, 0x41, 0x89,
|
||||
0x69, 0x98, 0x72, 0xac, 0xb3, 0x24, 0x67, 0x42, 0x87, 0x82, 0xe9, 0x2b, 0x94, 0x9b, 0xd9, 0x59,
|
||||
0x8e, 0x98, 0x73, 0x16, 0x19, 0xd6, 0xaa, 0x5e, 0x47, 0x57, 0x32, 0xa9, 0x2a, 0x26, 0x55, 0xf3,
|
||||
0x6e, 0x36, 0x4e, 0xb1, 0x2c, 0x51, 0xd8, 0xd3, 0x89, 0x7d, 0xd6, 0x06, 0x83, 0x5f, 0x0e, 0x9c,
|
||||
0xbc, 0xc5, 0x24, 0x5b, 0xd8, 0x8a, 0x94, 0x5d, 0xd6, 0x4c, 0x69, 0xf2, 0x06, 0x26, 0x6d, 0x58,
|
||||
0x79, 0x8e, 0xdf, 0x9f, 0x8f, 0xe2, 0xc7, 0xe1, 0xf5, 0x56, 0xc2, 0x8e, 0x46, 0xf7, 0x29, 0x79,
|
||||
0x09, 0x93, 0xf7, 0x15, 0x93, 0x89, 0x2e, 0x50, 0x7c, 0xfc, 0x5e, 0x31, 0xaf, 0xe7, 0x3b, 0xf3,
|
||||
0x69, 0x3c, 0x35, 0x5a, 0xfb, 0x1b, 0xda, 0x25, 0x05, 0xbf, 0x1d, 0x38, 0xed, 0x3a, 0x53, 0x15,
|
||||
0x0a, 0xc5, 0x6e, 0xd5, 0x5a, 0x0c, 0x03, 0xca, 0x54, 0xcd, 0xb5, 0xf1, 0x34, 0x8a, 0x67, 0x61,
|
||||
0x33, 0xd2, 0x70, 0x37, 0xd2, 0x70, 0x81, 0xc8, 0x3f, 0x25, 0xbc, 0x66, 0xd4, 0x32, 0xc9, 0x29,
|
||||
0x1c, 0xbf, 0x96, 0x12, 0xa5, 0xd7, 0xf7, 0x9d, 0xb9, 0x4b, 0x9b, 0x43, 0xf0, 0xd3, 0x81, 0xfb,
|
||||
0x07, 0xed, 0x42, 0xe4, 0xb4, 0xe6, 0x8c, 0x04, 0x30, 0x5e, 0x4b, 0x14, 0x9a, 0x89, 0x6c, 0x89,
|
||||
0x52, 0x7b, 0x8e, 0xef, 0xcc, 0x27, 0xb4, 0x83, 0x11, 0x1f, 0x46, 0xab, 0x24, 0xdd, 0xec, 0x28,
|
||||
0x3d, 0x43, 0x69, 0x43, 0xe4, 0x1c, 0x86, 0xc6, 0x4f, 0x8a, 0xdc, 0x14, 0x9d, 0xc6, 0x13, 0xd3,
|
||||
0xec, 0xd2, 0x82, 0x74, 0x7f, 0x1d, 0xfc, 0xe9, 0xc1, 0xb8, 0xdd, 0x22, 0x21, 0x70, 0x24, 0x92,
|
||||
0x92, 0x99, 0xca, 0x2e, 0x35, 0xdf, 0x64, 0x0a, 0xbd, 0x22, 0x33, 0x85, 0x5c, 0xda, 0x2b, 0x32,
|
||||
0x72, 0x06, 0xb0, 0x73, 0x74, 0xb1, 0xb4, 0x6d, 0xb5, 0x10, 0xf2, 0x04, 0xee, 0x59, 0x3b, 0x15,
|
||||
0x22, 0xdf, 0x4a, 0x28, 0xef, 0xc8, 0xef, 0xcf, 0x5d, 0xfa, 0x0f, 0x4e, 0x1e, 0x82, 0x6b, 0x07,
|
||||
0x5f, 0x64, 0xde, 0xb1, 0x91, 0x3a, 0x00, 0xe4, 0x73, 0x3b, 0xdf, 0x85, 0xc8, 0x65, 0xcd, 0x99,
|
||||
0xf2, 0x06, 0x66, 0x81, 0xe7, 0xff, 0x5f, 0xa0, 0x1d, 0x2b, 0xbd, 0x46, 0x84, 0xcc, 0x60, 0x28,
|
||||
0x30, 0x63, 0xeb, 0xcb, 0x4c, 0x78, 0x77, 0x4d, 0xdd, 0xfd, 0x79, 0x6b, 0x2a, 0x97, 0x58, 0x57,
|
||||
0xef, 0xb6, 0x93, 0x18, 0x36, 0xa6, 0xf6, 0xc0, 0x76, 0x49, 0x1c, 0x53, 0x93, 0x3c, 0x43, 0x70,
|
||||
0x0d, 0xa1, 0x83, 0x91, 0x47, 0x30, 0x50, 0x3a, 0xd1, 0xb5, 0xf2, 0xc0, 0x04, 0x65, 0x64, 0xcc,
|
||||
0x7e, 0x30, 0x10, 0xb5, 0x57, 0xf1, 0x8f, 0x76, 0x04, 0x98, 0x7c, 0xb5, 0xed, 0x82, 0x30, 0x18,
|
||||
0x5c, 0x88, 0x6f, 0xb8, 0x61, 0xe4, 0xe9, 0x8d, 0x12, 0xda, 0xfc, 0x80, 0xb3, 0x67, 0x37, 0x23,
|
||||
0x37, 0xff, 0x44, 0x70, 0x67, 0xf1, 0xfc, 0x4b, 0x94, 0x17, 0xfa, 0x6b, 0xbd, 0x0a, 0x53, 0x2c,
|
||||
0xa3, 0xb2, 0x48, 0x25, 0x2a, 0x5c, 0xeb, 0xa8, 0xc4, 0x34, 0x92, 0x55, 0x1a, 0x1d, 0x94, 0x22,
|
||||
0xab, 0xb4, 0x1a, 0x98, 0xd4, 0xbc, 0xf8, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xa5, 0xb3, 0x66, 0x95,
|
||||
0x73, 0x04, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// LoadBalancerAgentClient is the client API for LoadBalancerAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type LoadBalancerAgentClient interface {
|
||||
Invoke(ctx context.Context, in *LoadBalancerRequest, opts ...grpc.CallOption) (*LoadBalancerResponse, error)
|
||||
}
|
||||
|
||||
type loadBalancerAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewLoadBalancerAgentClient(cc *grpc.ClientConn) LoadBalancerAgentClient {
|
||||
return &loadBalancerAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *loadBalancerAgentClient) Invoke(ctx context.Context, in *LoadBalancerRequest, opts ...grpc.CallOption) (*LoadBalancerResponse, error) {
|
||||
out := new(LoadBalancerResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.network.LoadBalancerAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// LoadBalancerAgentServer is the server API for LoadBalancerAgent service.
|
||||
type LoadBalancerAgentServer interface {
|
||||
Invoke(context.Context, *LoadBalancerRequest) (*LoadBalancerResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedLoadBalancerAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedLoadBalancerAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedLoadBalancerAgentServer) Invoke(ctx context.Context, req *LoadBalancerRequest) (*LoadBalancerResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterLoadBalancerAgentServer(s *grpc.Server, srv LoadBalancerAgentServer) {
|
||||
s.RegisterService(&_LoadBalancerAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _LoadBalancerAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LoadBalancerRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(LoadBalancerAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.network.LoadBalancerAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(LoadBalancerAgentServer).Invoke(ctx, req.(*LoadBalancerRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _LoadBalancerAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.network.LoadBalancerAgent",
|
||||
HandlerType: (*LoadBalancerAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _LoadBalancerAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "loadbalancer.proto",
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/network";
|
||||
package moc.cloudagent.network;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
import "networkcommon.proto";
|
||||
|
||||
message LoadBalancerRequest {
|
||||
repeated LoadBalancer LoadBalancers = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message LoadBalancerResponse {
|
||||
repeated LoadBalancer LoadBalancers = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message LoadBalancingRule {
|
||||
uint32 frontendPort = 1;
|
||||
uint32 backendPort = 2;
|
||||
Protocol protocol = 3;
|
||||
}
|
||||
|
||||
message LoadBalancer {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
string frontendIP = 3;
|
||||
repeated string backendpoolnames = 4;
|
||||
string networkid = 5;
|
||||
repeated LoadBalancingRule loadbalancingrules = 6;
|
||||
string nodefqdn = 7;
|
||||
string groupName = 8;
|
||||
string locationName = 9;
|
||||
Status status = 10;
|
||||
}
|
||||
|
||||
service LoadBalancerAgent {
|
||||
rpc Invoke(LoadBalancerRequest) returns (LoadBalancerResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,367 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: macpool.proto
|
||||
|
||||
package network
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type MacPoolRequest struct {
|
||||
MacPools []*MacPool `protobuf:"bytes,1,rep,name=MacPools,proto3" json:"MacPools,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *MacPoolRequest) Reset() { *m = MacPoolRequest{} }
|
||||
func (m *MacPoolRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*MacPoolRequest) ProtoMessage() {}
|
||||
func (*MacPoolRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a13dd1158e4c70a3, []int{0}
|
||||
}
|
||||
|
||||
func (m *MacPoolRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MacPoolRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *MacPoolRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_MacPoolRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *MacPoolRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MacPoolRequest.Merge(m, src)
|
||||
}
|
||||
func (m *MacPoolRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_MacPoolRequest.Size(m)
|
||||
}
|
||||
func (m *MacPoolRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MacPoolRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MacPoolRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *MacPoolRequest) GetMacPools() []*MacPool {
|
||||
if m != nil {
|
||||
return m.MacPools
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MacPoolRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type MacPoolResponse struct {
|
||||
MacPools []*MacPool `protobuf:"bytes,1,rep,name=MacPools,proto3" json:"MacPools,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *MacPoolResponse) Reset() { *m = MacPoolResponse{} }
|
||||
func (m *MacPoolResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MacPoolResponse) ProtoMessage() {}
|
||||
func (*MacPoolResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a13dd1158e4c70a3, []int{1}
|
||||
}
|
||||
|
||||
func (m *MacPoolResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MacPoolResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *MacPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_MacPoolResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *MacPoolResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MacPoolResponse.Merge(m, src)
|
||||
}
|
||||
func (m *MacPoolResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_MacPoolResponse.Size(m)
|
||||
}
|
||||
func (m *MacPoolResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MacPoolResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MacPoolResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *MacPoolResponse) GetMacPools() []*MacPool {
|
||||
if m != nil {
|
||||
return m.MacPools
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MacPoolResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MacPoolResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type MacRange struct {
|
||||
StartMacAddress string `protobuf:"bytes,1,opt,name=startMacAddress,proto3" json:"startMacAddress,omitempty"`
|
||||
EndMacAddress string `protobuf:"bytes,2,opt,name=endMacAddress,proto3" json:"endMacAddress,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *MacRange) Reset() { *m = MacRange{} }
|
||||
func (m *MacRange) String() string { return proto.CompactTextString(m) }
|
||||
func (*MacRange) ProtoMessage() {}
|
||||
func (*MacRange) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a13dd1158e4c70a3, []int{2}
|
||||
}
|
||||
|
||||
func (m *MacRange) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MacRange.Unmarshal(m, b)
|
||||
}
|
||||
func (m *MacRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_MacRange.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *MacRange) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MacRange.Merge(m, src)
|
||||
}
|
||||
func (m *MacRange) XXX_Size() int {
|
||||
return xxx_messageInfo_MacRange.Size(m)
|
||||
}
|
||||
func (m *MacRange) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MacRange.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MacRange proto.InternalMessageInfo
|
||||
|
||||
func (m *MacRange) GetStartMacAddress() string {
|
||||
if m != nil {
|
||||
return m.StartMacAddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MacRange) GetEndMacAddress() string {
|
||||
if m != nil {
|
||||
return m.EndMacAddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type MacPool struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Range *MacRange `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"`
|
||||
LocationName string `protobuf:"bytes,4,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *MacPool) Reset() { *m = MacPool{} }
|
||||
func (m *MacPool) String() string { return proto.CompactTextString(m) }
|
||||
func (*MacPool) ProtoMessage() {}
|
||||
func (*MacPool) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_a13dd1158e4c70a3, []int{3}
|
||||
}
|
||||
|
||||
func (m *MacPool) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MacPool.Unmarshal(m, b)
|
||||
}
|
||||
func (m *MacPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_MacPool.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *MacPool) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MacPool.Merge(m, src)
|
||||
}
|
||||
func (m *MacPool) XXX_Size() int {
|
||||
return xxx_messageInfo_MacPool.Size(m)
|
||||
}
|
||||
func (m *MacPool) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MacPool.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MacPool proto.InternalMessageInfo
|
||||
|
||||
func (m *MacPool) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MacPool) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MacPool) GetRange() *MacRange {
|
||||
if m != nil {
|
||||
return m.Range
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *MacPool) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MacPool) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*MacPoolRequest)(nil), "moc.cloudagent.network.MacPoolRequest")
|
||||
proto.RegisterType((*MacPoolResponse)(nil), "moc.cloudagent.network.MacPoolResponse")
|
||||
proto.RegisterType((*MacRange)(nil), "moc.cloudagent.network.MacRange")
|
||||
proto.RegisterType((*MacPool)(nil), "moc.cloudagent.network.MacPool")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("macpool.proto", fileDescriptor_a13dd1158e4c70a3) }
|
||||
|
||||
var fileDescriptor_a13dd1158e4c70a3 = []byte{
|
||||
// 423 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xcf, 0x6e, 0xd4, 0x30,
|
||||
0x10, 0xc6, 0xc9, 0xb6, 0x0d, 0x30, 0xfb, 0xa7, 0x92, 0x85, 0xd0, 0x6a, 0x0f, 0xb0, 0x0a, 0x08,
|
||||
0x72, 0x72, 0x44, 0x40, 0x5c, 0x38, 0xb5, 0x12, 0x07, 0x0e, 0x05, 0x14, 0x10, 0x87, 0x72, 0xf2,
|
||||
0x3a, 0xd3, 0x10, 0x6d, 0xec, 0x31, 0xb6, 0x43, 0xc5, 0x99, 0x97, 0xe0, 0x29, 0x78, 0x46, 0x14,
|
||||
0xc7, 0x5d, 0x58, 0x84, 0xe8, 0x81, 0x5b, 0xfc, 0xcd, 0x37, 0xdf, 0xfc, 0x34, 0x13, 0x98, 0x2b,
|
||||
0x21, 0x0d, 0x51, 0xc7, 0x8d, 0x25, 0x4f, 0xec, 0xae, 0x22, 0xc9, 0x65, 0x47, 0x7d, 0x2d, 0x1a,
|
||||
0xd4, 0x9e, 0x6b, 0xf4, 0x97, 0x64, 0xb7, 0xab, 0x7b, 0x0d, 0x51, 0xd3, 0x61, 0x11, 0x5c, 0x9b,
|
||||
0xfe, 0xa2, 0xb8, 0xb4, 0xc2, 0x18, 0xb4, 0x6e, 0xec, 0x5b, 0xcd, 0x24, 0x29, 0x45, 0x7a, 0x7c,
|
||||
0x65, 0xdf, 0x12, 0x58, 0x9c, 0x09, 0xf9, 0x96, 0xa8, 0xab, 0xf0, 0x73, 0x8f, 0xce, 0xb3, 0x17,
|
||||
0x70, 0x2b, 0x2a, 0x6e, 0x99, 0xac, 0x0f, 0xf2, 0x69, 0x79, 0x9f, 0xff, 0x7d, 0x16, 0xbf, 0xea,
|
||||
0xdc, 0x35, 0xb0, 0x67, 0x30, 0x7f, 0x63, 0xd0, 0x0a, 0xdf, 0x92, 0x7e, 0xff, 0xd5, 0xe0, 0x72,
|
||||
0xb2, 0x4e, 0xf2, 0x45, 0xb9, 0x08, 0x09, 0xbb, 0x4a, 0xb5, 0x6f, 0xca, 0xbe, 0x27, 0x70, 0xbc,
|
||||
0xa3, 0x70, 0x86, 0xb4, 0xc3, 0xff, 0xc3, 0x28, 0x21, 0xad, 0xd0, 0xf5, 0x9d, 0x0f, 0xf3, 0xa7,
|
||||
0xe5, 0x8a, 0x8f, 0x5b, 0xe1, 0x57, 0x5b, 0xe1, 0xa7, 0x44, 0xdd, 0x07, 0xd1, 0xf5, 0x58, 0x45,
|
||||
0x27, 0xbb, 0x03, 0x47, 0x2f, 0xad, 0x25, 0xbb, 0x3c, 0x58, 0x27, 0xf9, 0xed, 0x6a, 0x7c, 0x64,
|
||||
0xe7, 0x01, 0xa3, 0x12, 0xba, 0x41, 0x96, 0xc3, 0xb1, 0xf3, 0xc2, 0xfa, 0x33, 0x21, 0x4f, 0xea,
|
||||
0xda, 0xa2, 0x1b, 0xc8, 0x06, 0xef, 0x9f, 0x32, 0x7b, 0x08, 0x73, 0xd4, 0xf5, 0x6f, 0xbe, 0x49,
|
||||
0xf0, 0xed, 0x8b, 0xd9, 0x8f, 0x04, 0x6e, 0x46, 0x64, 0xc6, 0xe0, 0x50, 0x0b, 0x85, 0x31, 0x30,
|
||||
0x7c, 0xb3, 0x05, 0x4c, 0xda, 0x3a, 0xb6, 0x4e, 0xda, 0x9a, 0x3d, 0x87, 0x23, 0x3b, 0x80, 0x04,
|
||||
0xc2, 0x69, 0xb9, 0xfe, 0xc7, 0x3e, 0x02, 0x70, 0x35, 0xda, 0x59, 0x06, 0xb3, 0x8e, 0x64, 0x58,
|
||||
0xf7, 0xeb, 0x61, 0xc6, 0x61, 0x48, 0xdc, 0xd3, 0xd8, 0x03, 0x48, 0x9d, 0x17, 0xbe, 0x77, 0xcb,
|
||||
0x34, 0x84, 0x4f, 0x43, 0xf8, 0xbb, 0x20, 0x55, 0xb1, 0x54, 0x6e, 0x61, 0x16, 0x79, 0x4f, 0x86,
|
||||
0x81, 0xec, 0x23, 0xa4, 0xaf, 0xf4, 0x17, 0xda, 0x22, 0x7b, 0x74, 0xdd, 0x6d, 0xc6, 0x9f, 0x6b,
|
||||
0xf5, 0xf8, 0x5a, 0xdf, 0x78, 0xfe, 0xec, 0xc6, 0xe9, 0x93, 0xf3, 0xa2, 0x69, 0xfd, 0xa7, 0x7e,
|
||||
0xc3, 0x25, 0xa9, 0x42, 0xb5, 0xd2, 0x92, 0xa3, 0x0b, 0x5f, 0x28, 0x92, 0x85, 0x35, 0xb2, 0xf8,
|
||||
0x15, 0x52, 0xc4, 0x90, 0x4d, 0x1a, 0xce, 0xfb, 0xf4, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbf,
|
||||
0xe4, 0x8a, 0x35, 0x2b, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// MacPoolAgentClient is the client API for MacPoolAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type MacPoolAgentClient interface {
|
||||
Invoke(ctx context.Context, in *MacPoolRequest, opts ...grpc.CallOption) (*MacPoolResponse, error)
|
||||
}
|
||||
|
||||
type macPoolAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewMacPoolAgentClient(cc *grpc.ClientConn) MacPoolAgentClient {
|
||||
return &macPoolAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *macPoolAgentClient) Invoke(ctx context.Context, in *MacPoolRequest, opts ...grpc.CallOption) (*MacPoolResponse, error) {
|
||||
out := new(MacPoolResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.network.MacPoolAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MacPoolAgentServer is the server API for MacPoolAgent service.
|
||||
type MacPoolAgentServer interface {
|
||||
Invoke(context.Context, *MacPoolRequest) (*MacPoolResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedMacPoolAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedMacPoolAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedMacPoolAgentServer) Invoke(ctx context.Context, req *MacPoolRequest) (*MacPoolResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterMacPoolAgentServer(s *grpc.Server, srv MacPoolAgentServer) {
|
||||
s.RegisterService(&_MacPoolAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _MacPoolAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MacPoolRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MacPoolAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.network.MacPoolAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MacPoolAgentServer).Invoke(ctx, req.(*MacPoolRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _MacPoolAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.network.MacPoolAgent",
|
||||
HandlerType: (*MacPoolAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _MacPoolAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "macpool.proto",
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/network";
|
||||
package moc.cloudagent.network;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
message MacPoolRequest {
|
||||
repeated MacPool MacPools = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message MacPoolResponse {
|
||||
repeated MacPool MacPools = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message MacRange {
|
||||
string startMacAddress = 1;
|
||||
string endMacAddress = 2;
|
||||
}
|
||||
|
||||
message MacPool {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
MacRange range = 3;
|
||||
string locationName = 4;
|
||||
Status status = 6;
|
||||
}
|
||||
|
||||
service MacPoolAgent {
|
||||
rpc Invoke(MacPoolRequest) returns (MacPoolResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: networkcommon.proto
|
||||
|
||||
package network
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Dns struct {
|
||||
Servers []string `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"`
|
||||
Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
|
||||
Search []string `protobuf:"bytes,3,rep,name=search,proto3" json:"search,omitempty"`
|
||||
Options []string `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Dns) Reset() { *m = Dns{} }
|
||||
func (m *Dns) String() string { return proto.CompactTextString(m) }
|
||||
func (*Dns) ProtoMessage() {}
|
||||
func (*Dns) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f4897f8092d214a0, []int{0}
|
||||
}
|
||||
|
||||
func (m *Dns) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Dns.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Dns) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Dns.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Dns) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Dns.Merge(m, src)
|
||||
}
|
||||
func (m *Dns) XXX_Size() int {
|
||||
return xxx_messageInfo_Dns.Size(m)
|
||||
}
|
||||
func (m *Dns) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Dns.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Dns proto.InternalMessageInfo
|
||||
|
||||
func (m *Dns) GetServers() []string {
|
||||
if m != nil {
|
||||
return m.Servers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Dns) GetDomain() string {
|
||||
if m != nil {
|
||||
return m.Domain
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Dns) GetSearch() []string {
|
||||
if m != nil {
|
||||
return m.Search
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Dns) GetOptions() []string {
|
||||
if m != nil {
|
||||
return m.Options
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Dns)(nil), "moc.cloudagent.network.Dns")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("networkcommon.proto", fileDescriptor_f4897f8092d214a0) }
|
||||
|
||||
var fileDescriptor_f4897f8092d214a0 = []byte{
|
||||
// 176 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xce, 0xc1, 0x8a, 0x83, 0x30,
|
||||
0x10, 0xc6, 0x71, 0x5c, 0x17, 0x17, 0x73, 0x59, 0xf0, 0x20, 0x39, 0xca, 0x9e, 0x3c, 0x25, 0x2c,
|
||||
0x7d, 0x83, 0xd2, 0x27, 0xf0, 0xd8, 0x9b, 0x8e, 0xa9, 0x86, 0x36, 0xf9, 0x24, 0x19, 0xdb, 0xd7,
|
||||
0x2f, 0xda, 0x94, 0x1e, 0x7f, 0x03, 0xf3, 0xf1, 0x17, 0xbf, 0xde, 0x30, 0xc1, 0x39, 0x78, 0xb5,
|
||||
0x04, 0x30, 0xaa, 0xda, 0x81, 0x14, 0xdd, 0xb0, 0x8e, 0xfd, 0x64, 0x3c, 0x2b, 0x6f, 0xf8, 0x81,
|
||||
0x70, 0xfd, 0xb3, 0x22, 0x3f, 0xf9, 0x58, 0x49, 0xf1, 0x13, 0x4d, 0xb8, 0x9b, 0x10, 0x65, 0xd6,
|
||||
0xe4, 0x6d, 0xd9, 0xbd, 0x59, 0xd5, 0xa2, 0x18, 0xe1, 0x7a, 0xeb, 0xe5, 0x57, 0x93, 0xb5, 0x65,
|
||||
0x97, 0xb4, 0xdd, 0xa3, 0xe9, 0x03, 0xcd, 0x32, 0xdf, 0x1f, 0x92, 0xb6, 0x25, 0x2c, 0x6c, 0xe1,
|
||||
0xa3, 0xfc, 0x7e, 0x2d, 0x25, 0x1e, 0xff, 0xcf, 0x7a, 0xb2, 0x3c, 0xaf, 0x83, 0x22, 0x38, 0xed,
|
||||
0x2c, 0x05, 0x44, 0x5c, 0x58, 0x3b, 0x90, 0x0e, 0x0b, 0xe9, 0x4f, 0x9d, 0x4e, 0x75, 0x43, 0xb1,
|
||||
0xc7, 0x1f, 0x9e, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc4, 0xd9, 0x34, 0x66, 0xcf, 0x00, 0x00, 0x00,
|
||||
}
|
|
@ -0,0 +1,504 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: networkinterface.proto
|
||||
|
||||
package network
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type NetworkInterface_NetworkInterfaceType int32
|
||||
|
||||
const (
|
||||
NetworkInterface_Local NetworkInterface_NetworkInterfaceType = 0
|
||||
NetworkInterface_Remote NetworkInterface_NetworkInterfaceType = 1
|
||||
)
|
||||
|
||||
var NetworkInterface_NetworkInterfaceType_name = map[int32]string{
|
||||
0: "Local",
|
||||
1: "Remote",
|
||||
}
|
||||
|
||||
var NetworkInterface_NetworkInterfaceType_value = map[string]int32{
|
||||
"Local": 0,
|
||||
"Remote": 1,
|
||||
}
|
||||
|
||||
func (x NetworkInterface_NetworkInterfaceType) String() string {
|
||||
return proto.EnumName(NetworkInterface_NetworkInterfaceType_name, int32(x))
|
||||
}
|
||||
|
||||
func (NetworkInterface_NetworkInterfaceType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_72a481e6e4e12e01, []int{3, 0}
|
||||
}
|
||||
|
||||
type NetworkInterfaceRequest struct {
|
||||
NetworkInterfaces []*NetworkInterface `protobuf:"bytes,1,rep,name=NetworkInterfaces,proto3" json:"NetworkInterfaces,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NetworkInterfaceRequest) Reset() { *m = NetworkInterfaceRequest{} }
|
||||
func (m *NetworkInterfaceRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*NetworkInterfaceRequest) ProtoMessage() {}
|
||||
func (*NetworkInterfaceRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_72a481e6e4e12e01, []int{0}
|
||||
}
|
||||
|
||||
func (m *NetworkInterfaceRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NetworkInterfaceRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NetworkInterfaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NetworkInterfaceRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NetworkInterfaceRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NetworkInterfaceRequest.Merge(m, src)
|
||||
}
|
||||
func (m *NetworkInterfaceRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_NetworkInterfaceRequest.Size(m)
|
||||
}
|
||||
func (m *NetworkInterfaceRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NetworkInterfaceRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NetworkInterfaceRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *NetworkInterfaceRequest) GetNetworkInterfaces() []*NetworkInterface {
|
||||
if m != nil {
|
||||
return m.NetworkInterfaces
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NetworkInterfaceRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type NetworkInterfaceResponse struct {
|
||||
NetworkInterfaces []*NetworkInterface `protobuf:"bytes,1,rep,name=NetworkInterfaces,proto3" json:"NetworkInterfaces,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NetworkInterfaceResponse) Reset() { *m = NetworkInterfaceResponse{} }
|
||||
func (m *NetworkInterfaceResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*NetworkInterfaceResponse) ProtoMessage() {}
|
||||
func (*NetworkInterfaceResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_72a481e6e4e12e01, []int{1}
|
||||
}
|
||||
|
||||
func (m *NetworkInterfaceResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NetworkInterfaceResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NetworkInterfaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NetworkInterfaceResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NetworkInterfaceResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NetworkInterfaceResponse.Merge(m, src)
|
||||
}
|
||||
func (m *NetworkInterfaceResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_NetworkInterfaceResponse.Size(m)
|
||||
}
|
||||
func (m *NetworkInterfaceResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NetworkInterfaceResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NetworkInterfaceResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *NetworkInterfaceResponse) GetNetworkInterfaces() []*NetworkInterface {
|
||||
if m != nil {
|
||||
return m.NetworkInterfaces
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NetworkInterfaceResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NetworkInterfaceResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type IpConfiguration struct {
|
||||
Ipaddress string `protobuf:"bytes,1,opt,name=ipaddress,proto3" json:"ipaddress,omitempty"`
|
||||
Prefixlength string `protobuf:"bytes,2,opt,name=prefixlength,proto3" json:"prefixlength,omitempty"`
|
||||
Subnetid string `protobuf:"bytes,3,opt,name=subnetid,proto3" json:"subnetid,omitempty"`
|
||||
Primary bool `protobuf:"varint,4,opt,name=primary,proto3" json:"primary,omitempty"`
|
||||
Loadbalanceraddresspool []string `protobuf:"bytes,5,rep,name=loadbalanceraddresspool,proto3" json:"loadbalanceraddresspool,omitempty"`
|
||||
Allocation common.IPAllocationMethod `protobuf:"varint,6,opt,name=allocation,proto3,enum=moc.IPAllocationMethod" json:"allocation,omitempty"`
|
||||
Gateway string `protobuf:"bytes,7,opt,name=gateway,proto3" json:"gateway,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *IpConfiguration) Reset() { *m = IpConfiguration{} }
|
||||
func (m *IpConfiguration) String() string { return proto.CompactTextString(m) }
|
||||
func (*IpConfiguration) ProtoMessage() {}
|
||||
func (*IpConfiguration) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_72a481e6e4e12e01, []int{2}
|
||||
}
|
||||
|
||||
func (m *IpConfiguration) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_IpConfiguration.Unmarshal(m, b)
|
||||
}
|
||||
func (m *IpConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_IpConfiguration.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *IpConfiguration) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_IpConfiguration.Merge(m, src)
|
||||
}
|
||||
func (m *IpConfiguration) XXX_Size() int {
|
||||
return xxx_messageInfo_IpConfiguration.Size(m)
|
||||
}
|
||||
func (m *IpConfiguration) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_IpConfiguration.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_IpConfiguration proto.InternalMessageInfo
|
||||
|
||||
func (m *IpConfiguration) GetIpaddress() string {
|
||||
if m != nil {
|
||||
return m.Ipaddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *IpConfiguration) GetPrefixlength() string {
|
||||
if m != nil {
|
||||
return m.Prefixlength
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *IpConfiguration) GetSubnetid() string {
|
||||
if m != nil {
|
||||
return m.Subnetid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *IpConfiguration) GetPrimary() bool {
|
||||
if m != nil {
|
||||
return m.Primary
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *IpConfiguration) GetLoadbalanceraddresspool() []string {
|
||||
if m != nil {
|
||||
return m.Loadbalanceraddresspool
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IpConfiguration) GetAllocation() common.IPAllocationMethod {
|
||||
if m != nil {
|
||||
return m.Allocation
|
||||
}
|
||||
return common.IPAllocationMethod_Invalid
|
||||
}
|
||||
|
||||
func (m *IpConfiguration) GetGateway() string {
|
||||
if m != nil {
|
||||
return m.Gateway
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type NetworkInterface struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Type NetworkInterface_NetworkInterfaceType `protobuf:"varint,3,opt,name=type,proto3,enum=moc.cloudagent.network.NetworkInterface_NetworkInterfaceType" json:"type,omitempty"`
|
||||
IpConfigurations []*IpConfiguration `protobuf:"bytes,4,rep,name=ipConfigurations,proto3" json:"ipConfigurations,omitempty"`
|
||||
Macaddress string `protobuf:"bytes,5,opt,name=macaddress,proto3" json:"macaddress,omitempty"`
|
||||
Dns *common.Dns `protobuf:"bytes,6,opt,name=dns,proto3" json:"dns,omitempty"`
|
||||
NodeName string `protobuf:"bytes,7,opt,name=nodeName,proto3" json:"nodeName,omitempty"`
|
||||
GroupName string `protobuf:"bytes,8,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
LocationName string `protobuf:"bytes,9,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty"`
|
||||
VirtualMachineName string `protobuf:"bytes,11,opt,name=virtualMachineName,proto3" json:"virtualMachineName,omitempty"`
|
||||
IovWeight uint32 `protobuf:"varint,12,opt,name=iovWeight,proto3" json:"iovWeight,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) Reset() { *m = NetworkInterface{} }
|
||||
func (m *NetworkInterface) String() string { return proto.CompactTextString(m) }
|
||||
func (*NetworkInterface) ProtoMessage() {}
|
||||
func (*NetworkInterface) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_72a481e6e4e12e01, []int{3}
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NetworkInterface.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NetworkInterface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NetworkInterface.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NetworkInterface) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NetworkInterface.Merge(m, src)
|
||||
}
|
||||
func (m *NetworkInterface) XXX_Size() int {
|
||||
return xxx_messageInfo_NetworkInterface.Size(m)
|
||||
}
|
||||
func (m *NetworkInterface) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NetworkInterface.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NetworkInterface proto.InternalMessageInfo
|
||||
|
||||
func (m *NetworkInterface) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) GetType() NetworkInterface_NetworkInterfaceType {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return NetworkInterface_Local
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) GetIpConfigurations() []*IpConfiguration {
|
||||
if m != nil {
|
||||
return m.IpConfigurations
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) GetMacaddress() string {
|
||||
if m != nil {
|
||||
return m.Macaddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) GetDns() *common.Dns {
|
||||
if m != nil {
|
||||
return m.Dns
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) GetNodeName() string {
|
||||
if m != nil {
|
||||
return m.NodeName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) GetVirtualMachineName() string {
|
||||
if m != nil {
|
||||
return m.VirtualMachineName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NetworkInterface) GetIovWeight() uint32 {
|
||||
if m != nil {
|
||||
return m.IovWeight
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.cloudagent.network.NetworkInterface_NetworkInterfaceType", NetworkInterface_NetworkInterfaceType_name, NetworkInterface_NetworkInterfaceType_value)
|
||||
proto.RegisterType((*NetworkInterfaceRequest)(nil), "moc.cloudagent.network.NetworkInterfaceRequest")
|
||||
proto.RegisterType((*NetworkInterfaceResponse)(nil), "moc.cloudagent.network.NetworkInterfaceResponse")
|
||||
proto.RegisterType((*IpConfiguration)(nil), "moc.cloudagent.network.IpConfiguration")
|
||||
proto.RegisterType((*NetworkInterface)(nil), "moc.cloudagent.network.NetworkInterface")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("networkinterface.proto", fileDescriptor_72a481e6e4e12e01) }
|
||||
|
||||
var fileDescriptor_72a481e6e4e12e01 = []byte{
|
||||
// 670 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0xd3, 0x4a,
|
||||
0x14, 0xae, 0xf3, 0xd7, 0xe4, 0xa4, 0xed, 0xcd, 0x9d, 0xdb, 0xdb, 0x5a, 0x11, 0xaa, 0xa2, 0xb0,
|
||||
0xc0, 0x1b, 0x6c, 0x08, 0x48, 0xb0, 0x61, 0xd1, 0x02, 0x8b, 0x48, 0xb4, 0xc0, 0x14, 0x15, 0x89,
|
||||
0xdd, 0xc4, 0x9e, 0x38, 0xa3, 0xda, 0x73, 0xcc, 0xcc, 0xb8, 0xa5, 0x2f, 0xc0, 0x23, 0xb0, 0xe0,
|
||||
0x05, 0x78, 0x09, 0x1e, 0x0e, 0x79, 0xec, 0xa4, 0x69, 0xd2, 0x4a, 0xdd, 0xb0, 0xf3, 0xf9, 0xce,
|
||||
0x99, 0xef, 0x7c, 0xfe, 0xce, 0x99, 0x81, 0x3d, 0xc9, 0xcd, 0x25, 0xaa, 0x73, 0x21, 0x0d, 0x57,
|
||||
0x53, 0x16, 0x72, 0x3f, 0x53, 0x68, 0x90, 0xec, 0xa5, 0x18, 0xfa, 0x61, 0x82, 0x79, 0xc4, 0x62,
|
||||
0x2e, 0x8d, 0x5f, 0x95, 0xf5, 0x0f, 0x62, 0xc4, 0x38, 0xe1, 0x81, 0xad, 0x9a, 0xe4, 0xd3, 0xe0,
|
||||
0x52, 0xb1, 0x2c, 0xe3, 0x4a, 0x97, 0xe7, 0xfa, 0x5b, 0x21, 0xa6, 0x29, 0xca, 0x2a, 0xfa, 0xaf,
|
||||
0x3a, 0xb6, 0x0c, 0x0e, 0x7f, 0x39, 0xb0, 0x7f, 0x52, 0xe2, 0xe3, 0x79, 0x57, 0xca, 0xbf, 0xe6,
|
||||
0x5c, 0x1b, 0x72, 0x06, 0xff, 0xae, 0xa6, 0xb4, 0xeb, 0x0c, 0xea, 0x5e, 0x77, 0xe4, 0xf9, 0xb7,
|
||||
0x4b, 0xf2, 0xd7, 0xb8, 0xd6, 0x29, 0xc8, 0x73, 0xd8, 0x7e, 0x9f, 0x71, 0xc5, 0x8c, 0x40, 0xf9,
|
||||
0xe9, 0x2a, 0xe3, 0x6e, 0x6d, 0xe0, 0x78, 0x3b, 0xa3, 0x1d, 0xcb, 0xb9, 0xc8, 0xd0, 0x9b, 0x45,
|
||||
0xc3, 0xdf, 0x0e, 0xb8, 0xeb, 0x4a, 0x75, 0x86, 0x52, 0xf3, 0xbf, 0x26, 0x75, 0x04, 0x2d, 0xca,
|
||||
0x75, 0x9e, 0x18, 0xab, 0xb1, 0x3b, 0xea, 0xfb, 0xa5, 0xe5, 0xfe, 0xdc, 0x72, 0xff, 0x08, 0x31,
|
||||
0x39, 0x63, 0x49, 0xce, 0x69, 0x55, 0x49, 0x76, 0xa1, 0xf9, 0x56, 0x29, 0x54, 0x6e, 0x7d, 0xe0,
|
||||
0x78, 0x1d, 0x5a, 0x06, 0xc3, 0x1f, 0x35, 0xf8, 0x67, 0x9c, 0xbd, 0x46, 0x39, 0x15, 0x71, 0x5e,
|
||||
0xfe, 0x16, 0x79, 0x00, 0x1d, 0x91, 0xb1, 0x28, 0x52, 0x5c, 0x17, 0x6a, 0x8b, 0xea, 0x6b, 0x80,
|
||||
0x0c, 0x61, 0x2b, 0x53, 0x7c, 0x2a, 0xbe, 0x25, 0x5c, 0xc6, 0x66, 0x66, 0x15, 0x74, 0xe8, 0x0d,
|
||||
0x8c, 0xf4, 0xa1, 0xad, 0xf3, 0x89, 0xe4, 0x46, 0x44, 0x55, 0xbb, 0x45, 0x4c, 0x5c, 0xd8, 0xcc,
|
||||
0x94, 0x48, 0x99, 0xba, 0x72, 0x1b, 0x03, 0xc7, 0x6b, 0xd3, 0x79, 0x48, 0x5e, 0xc2, 0x7e, 0x82,
|
||||
0x2c, 0x9a, 0xb0, 0x84, 0xc9, 0x90, 0xab, 0xaa, 0x61, 0x86, 0x98, 0xb8, 0xcd, 0x41, 0xdd, 0xeb,
|
||||
0xd0, 0xbb, 0xd2, 0xe4, 0x05, 0x00, 0x4b, 0x12, 0x0c, 0xad, 0x7e, 0xb7, 0x65, 0xe7, 0xb6, 0x6f,
|
||||
0x0d, 0x1e, 0x7f, 0x38, 0x5c, 0x24, 0x8e, 0xb9, 0x99, 0x61, 0x44, 0x97, 0x4a, 0x0b, 0x31, 0x31,
|
||||
0x33, 0xfc, 0x92, 0x5d, 0xb9, 0x9b, 0x56, 0xe7, 0x3c, 0x1c, 0xfe, 0x6c, 0x40, 0x6f, 0xd5, 0x78,
|
||||
0x42, 0xa0, 0x21, 0x59, 0xca, 0x2b, 0x53, 0xec, 0x37, 0xd9, 0x81, 0x9a, 0x88, 0x2a, 0x17, 0x6a,
|
||||
0x22, 0x22, 0x1f, 0xa1, 0x61, 0x8a, 0xed, 0xa9, 0x5b, 0x15, 0xaf, 0xee, 0x3b, 0xe6, 0x35, 0xa0,
|
||||
0xd8, 0x2e, 0x6a, 0xa9, 0xc8, 0x29, 0xf4, 0xc4, 0xcd, 0x19, 0x69, 0xb7, 0x61, 0xb7, 0xe8, 0xd1,
|
||||
0x5d, 0xf4, 0x2b, 0x33, 0xa5, 0x6b, 0x04, 0xe4, 0x00, 0x20, 0x65, 0xe1, 0x7c, 0xcc, 0x4d, 0xab,
|
||||
0x7f, 0x09, 0x21, 0x7d, 0xa8, 0x47, 0x52, 0x5b, 0x33, 0xbb, 0xa3, 0xb6, 0xed, 0xf3, 0x46, 0x6a,
|
||||
0x5a, 0x80, 0xc5, 0x7c, 0x25, 0x46, 0xfc, 0xa4, 0xf0, 0xa2, 0xf4, 0x6d, 0x11, 0x17, 0xdb, 0x13,
|
||||
0x2b, 0xcc, 0x33, 0x9b, 0x6c, 0x97, 0xdb, 0xb3, 0x00, 0x8a, 0xed, 0x99, 0x9b, 0x6f, 0x0b, 0x3a,
|
||||
0xe5, 0xf6, 0x2c, 0x63, 0xe4, 0x21, 0xb4, 0xb4, 0x61, 0x26, 0xd7, 0x2e, 0xd8, 0xe6, 0x5d, 0xdb,
|
||||
0xfc, 0xd4, 0x42, 0xb4, 0x4a, 0x11, 0x1f, 0xc8, 0x85, 0x50, 0x26, 0x67, 0xc9, 0x31, 0x0b, 0x67,
|
||||
0x42, 0x96, 0x62, 0xba, 0x96, 0xee, 0x96, 0x8c, 0x5d, 0x6a, 0xbc, 0xf8, 0xcc, 0x45, 0x3c, 0x33,
|
||||
0xee, 0xd6, 0xc0, 0xf1, 0xb6, 0xe9, 0x35, 0x30, 0x7c, 0x0c, 0xbb, 0xb7, 0xf9, 0x4f, 0x3a, 0xd0,
|
||||
0x7c, 0x87, 0x21, 0x4b, 0x7a, 0x1b, 0x04, 0x8a, 0x3b, 0x97, 0xa2, 0xe1, 0x3d, 0x67, 0xf4, 0xdd,
|
||||
0x81, 0xff, 0x57, 0xeb, 0x0f, 0x0b, 0xff, 0x49, 0x0a, 0xad, 0xb1, 0xbc, 0xc0, 0x73, 0x4e, 0x82,
|
||||
0x7b, 0x5f, 0xf0, 0xf2, 0x5d, 0xeb, 0x3f, 0xb9, 0xff, 0x81, 0xf2, 0x79, 0x19, 0x6e, 0x1c, 0x3d,
|
||||
0xfd, 0x12, 0xc4, 0xc2, 0xcc, 0xf2, 0x89, 0x1f, 0x62, 0x1a, 0xa4, 0x22, 0x54, 0xa8, 0x71, 0x6a,
|
||||
0x82, 0x14, 0xc3, 0x40, 0x65, 0x61, 0x70, 0xcd, 0x16, 0x54, 0x6c, 0x93, 0x96, 0x7d, 0x23, 0x9e,
|
||||
0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x44, 0x42, 0x0d, 0x4a, 0xd6, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// NetworkInterfaceAgentClient is the client API for NetworkInterfaceAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type NetworkInterfaceAgentClient interface {
|
||||
Invoke(ctx context.Context, in *NetworkInterfaceRequest, opts ...grpc.CallOption) (*NetworkInterfaceResponse, error)
|
||||
}
|
||||
|
||||
type networkInterfaceAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewNetworkInterfaceAgentClient(cc *grpc.ClientConn) NetworkInterfaceAgentClient {
|
||||
return &networkInterfaceAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *networkInterfaceAgentClient) Invoke(ctx context.Context, in *NetworkInterfaceRequest, opts ...grpc.CallOption) (*NetworkInterfaceResponse, error) {
|
||||
out := new(NetworkInterfaceResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.network.NetworkInterfaceAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// NetworkInterfaceAgentServer is the server API for NetworkInterfaceAgent service.
|
||||
type NetworkInterfaceAgentServer interface {
|
||||
Invoke(context.Context, *NetworkInterfaceRequest) (*NetworkInterfaceResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedNetworkInterfaceAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedNetworkInterfaceAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedNetworkInterfaceAgentServer) Invoke(ctx context.Context, req *NetworkInterfaceRequest) (*NetworkInterfaceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterNetworkInterfaceAgentServer(s *grpc.Server, srv NetworkInterfaceAgentServer) {
|
||||
s.RegisterService(&_NetworkInterfaceAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _NetworkInterfaceAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(NetworkInterfaceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(NetworkInterfaceAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.network.NetworkInterfaceAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(NetworkInterfaceAgentServer).Invoke(ctx, req.(*NetworkInterfaceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _NetworkInterfaceAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.network.NetworkInterfaceAgent",
|
||||
HandlerType: (*NetworkInterfaceAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _NetworkInterfaceAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "networkinterface.proto",
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/network";
|
||||
package moc.cloudagent.network;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
import "networkcommon.proto";
|
||||
|
||||
message NetworkInterfaceRequest {
|
||||
repeated NetworkInterface NetworkInterfaces = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message NetworkInterfaceResponse {
|
||||
repeated NetworkInterface NetworkInterfaces = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message IpConfiguration {
|
||||
string ipaddress = 1;
|
||||
string prefixlength = 2;
|
||||
string subnetid = 3;
|
||||
bool primary = 4;
|
||||
repeated string loadbalanceraddresspool = 5;
|
||||
IPAllocationMethod allocation = 6;
|
||||
string gateway = 7;
|
||||
}
|
||||
|
||||
message NetworkInterface {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
enum NetworkInterfaceType {
|
||||
Local = 0;
|
||||
Remote = 1;
|
||||
}
|
||||
NetworkInterfaceType type = 3;
|
||||
repeated IpConfiguration ipConfigurations = 4;
|
||||
string macaddress = 5;
|
||||
Dns dns = 6;
|
||||
string nodeName = 7;
|
||||
string groupName = 8;
|
||||
string locationName = 9;
|
||||
Status status = 10;
|
||||
string virtualMachineName = 11;
|
||||
uint32 iovWeight = 12;
|
||||
}
|
||||
|
||||
service NetworkInterfaceAgent {
|
||||
rpc Invoke(NetworkInterfaceRequest) returns (NetworkInterfaceResponse) {}
|
||||
}
|
|
@ -0,0 +1,360 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: vippool.proto
|
||||
|
||||
package network
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type VipPoolRequest struct {
|
||||
VipPools []*VipPool `protobuf:"bytes,1,rep,name=VipPools,proto3" json:"VipPools,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VipPoolRequest) Reset() { *m = VipPoolRequest{} }
|
||||
func (m *VipPoolRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*VipPoolRequest) ProtoMessage() {}
|
||||
func (*VipPoolRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_34da3589aa67c0c5, []int{0}
|
||||
}
|
||||
|
||||
func (m *VipPoolRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VipPoolRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VipPoolRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VipPoolRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VipPoolRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VipPoolRequest.Merge(m, src)
|
||||
}
|
||||
func (m *VipPoolRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_VipPoolRequest.Size(m)
|
||||
}
|
||||
func (m *VipPoolRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VipPoolRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VipPoolRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *VipPoolRequest) GetVipPools() []*VipPool {
|
||||
if m != nil {
|
||||
return m.VipPools
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VipPoolRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type VipPoolResponse struct {
|
||||
VipPools []*VipPool `protobuf:"bytes,1,rep,name=VipPools,proto3" json:"VipPools,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VipPoolResponse) Reset() { *m = VipPoolResponse{} }
|
||||
func (m *VipPoolResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VipPoolResponse) ProtoMessage() {}
|
||||
func (*VipPoolResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_34da3589aa67c0c5, []int{1}
|
||||
}
|
||||
|
||||
func (m *VipPoolResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VipPoolResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VipPoolResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VipPoolResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VipPoolResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VipPoolResponse.Merge(m, src)
|
||||
}
|
||||
func (m *VipPoolResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_VipPoolResponse.Size(m)
|
||||
}
|
||||
func (m *VipPoolResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VipPoolResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VipPoolResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *VipPoolResponse) GetVipPools() []*VipPool {
|
||||
if m != nil {
|
||||
return m.VipPools
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VipPoolResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VipPoolResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type VipPool struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Cidr string `protobuf:"bytes,3,opt,name=cidr,proto3" json:"cidr,omitempty"`
|
||||
Networkid string `protobuf:"bytes,4,opt,name=networkid,proto3" json:"networkid,omitempty"`
|
||||
Nodefqdn string `protobuf:"bytes,5,opt,name=nodefqdn,proto3" json:"nodefqdn,omitempty"`
|
||||
GroupName string `protobuf:"bytes,6,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
LocationName string `protobuf:"bytes,7,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Startip string `protobuf:"bytes,9,opt,name=startip,proto3" json:"startip,omitempty"`
|
||||
Endip string `protobuf:"bytes,10,opt,name=endip,proto3" json:"endip,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VipPool) Reset() { *m = VipPool{} }
|
||||
func (m *VipPool) String() string { return proto.CompactTextString(m) }
|
||||
func (*VipPool) ProtoMessage() {}
|
||||
func (*VipPool) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_34da3589aa67c0c5, []int{2}
|
||||
}
|
||||
|
||||
func (m *VipPool) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VipPool.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VipPool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VipPool.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VipPool) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VipPool.Merge(m, src)
|
||||
}
|
||||
func (m *VipPool) XXX_Size() int {
|
||||
return xxx_messageInfo_VipPool.Size(m)
|
||||
}
|
||||
func (m *VipPool) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VipPool.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VipPool proto.InternalMessageInfo
|
||||
|
||||
func (m *VipPool) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VipPool) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VipPool) GetCidr() string {
|
||||
if m != nil {
|
||||
return m.Cidr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VipPool) GetNetworkid() string {
|
||||
if m != nil {
|
||||
return m.Networkid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VipPool) GetNodefqdn() string {
|
||||
if m != nil {
|
||||
return m.Nodefqdn
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VipPool) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VipPool) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VipPool) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VipPool) GetStartip() string {
|
||||
if m != nil {
|
||||
return m.Startip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VipPool) GetEndip() string {
|
||||
if m != nil {
|
||||
return m.Endip
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*VipPoolRequest)(nil), "moc.cloudagent.network.VipPoolRequest")
|
||||
proto.RegisterType((*VipPoolResponse)(nil), "moc.cloudagent.network.VipPoolResponse")
|
||||
proto.RegisterType((*VipPool)(nil), "moc.cloudagent.network.VipPool")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("vippool.proto", fileDescriptor_34da3589aa67c0c5) }
|
||||
|
||||
var fileDescriptor_34da3589aa67c0c5 = []byte{
|
||||
// 436 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0x4d, 0x8b, 0xd4, 0x40,
|
||||
0x10, 0x35, 0xb3, 0xbb, 0xf3, 0x51, 0x33, 0x3b, 0x42, 0x23, 0xd2, 0x04, 0xd1, 0x21, 0x82, 0xce,
|
||||
0xa9, 0x83, 0xd1, 0x9b, 0x27, 0x17, 0x3c, 0x78, 0x51, 0x89, 0xb2, 0x07, 0x3d, 0x65, 0x3a, 0x3d,
|
||||
0xb1, 0x99, 0xa4, 0xab, 0xb7, 0xbb, 0xb3, 0x8b, 0x67, 0xff, 0x81, 0x27, 0x7f, 0xae, 0xa4, 0x92,
|
||||
0xc9, 0xb2, 0x20, 0xec, 0xc1, 0x5b, 0xd7, 0xab, 0xf7, 0x5e, 0x15, 0xaf, 0x1a, 0xce, 0xaf, 0xb5,
|
||||
0xb5, 0x88, 0xb5, 0xb0, 0x0e, 0x03, 0xb2, 0xc7, 0x0d, 0x4a, 0x21, 0x6b, 0x6c, 0xcb, 0xa2, 0x52,
|
||||
0x26, 0x08, 0xa3, 0xc2, 0x0d, 0xba, 0x43, 0xfc, 0xb4, 0x42, 0xac, 0x6a, 0x95, 0x12, 0x6b, 0xd7,
|
||||
0xee, 0xd3, 0x1b, 0x57, 0x58, 0xab, 0x9c, 0xef, 0x75, 0xf1, 0x4a, 0x62, 0xd3, 0xa0, 0xe9, 0xab,
|
||||
0xe4, 0x57, 0x04, 0xeb, 0x4b, 0x6d, 0x3f, 0x23, 0xd6, 0xb9, 0xba, 0x6a, 0x95, 0x0f, 0xec, 0x2d,
|
||||
0xcc, 0x07, 0xc4, 0xf3, 0x68, 0x73, 0xb2, 0x5d, 0x66, 0xcf, 0xc4, 0xbf, 0x67, 0x89, 0xa3, 0x72,
|
||||
0x14, 0xb0, 0x37, 0x70, 0xfe, 0xc9, 0x2a, 0x57, 0x04, 0x8d, 0xe6, 0xeb, 0x4f, 0xab, 0xf8, 0x64,
|
||||
0x13, 0x6d, 0xd7, 0xd9, 0x9a, 0x1c, 0xc6, 0x4e, 0x7e, 0x97, 0x94, 0xfc, 0x89, 0xe0, 0xe1, 0xb8,
|
||||
0x85, 0xb7, 0x68, 0xbc, 0xfa, 0xbf, 0x35, 0x32, 0x98, 0xe6, 0xca, 0xb7, 0x75, 0xa0, 0xf9, 0xcb,
|
||||
0x2c, 0x16, 0x7d, 0x2a, 0xe2, 0x98, 0x8a, 0xb8, 0x40, 0xac, 0x2f, 0x8b, 0xba, 0x55, 0xf9, 0xc0,
|
||||
0x64, 0x8f, 0xe0, 0xec, 0xbd, 0x73, 0xe8, 0xf8, 0xc9, 0x26, 0xda, 0x2e, 0xf2, 0xbe, 0x48, 0x7e,
|
||||
0x4f, 0x60, 0x36, 0xd8, 0x32, 0x06, 0xa7, 0xa6, 0x68, 0x14, 0x8f, 0x88, 0x40, 0x6f, 0xb6, 0x86,
|
||||
0x89, 0x2e, 0x69, 0xca, 0x22, 0x9f, 0xe8, 0xb2, 0xe3, 0x48, 0x5d, 0x1e, 0x4d, 0xe8, 0xcd, 0x9e,
|
||||
0xc0, 0x62, 0x58, 0x55, 0x97, 0xfc, 0x94, 0x1a, 0xb7, 0x00, 0x8b, 0x61, 0x6e, 0xb0, 0x54, 0xfb,
|
||||
0xab, 0xd2, 0xf0, 0x33, 0x6a, 0x8e, 0x75, 0xa7, 0xac, 0x1c, 0xb6, 0xf6, 0x63, 0x37, 0x76, 0xda,
|
||||
0x2b, 0x47, 0x80, 0x25, 0xb0, 0xaa, 0x51, 0x52, 0x8c, 0x44, 0x98, 0x11, 0xe1, 0x0e, 0xc6, 0x9e,
|
||||
0xc3, 0xd4, 0x87, 0x22, 0xb4, 0x9e, 0xcf, 0x29, 0x89, 0x25, 0x85, 0xf8, 0x85, 0xa0, 0x7c, 0x68,
|
||||
0x31, 0x0e, 0x33, 0x1f, 0x0a, 0x17, 0xb4, 0xe5, 0x0b, 0xf2, 0x38, 0x96, 0x5d, 0x28, 0xca, 0x94,
|
||||
0xda, 0x72, 0xe8, 0x43, 0xa1, 0x22, 0x3b, 0xc0, 0x6a, 0xc8, 0xe4, 0x5d, 0x77, 0x08, 0xf6, 0x1d,
|
||||
0xa6, 0x1f, 0xcc, 0x35, 0x1e, 0x14, 0x7b, 0x71, 0xdf, 0x8d, 0xfa, 0x4f, 0x16, 0xbf, 0xbc, 0x97,
|
||||
0xd7, 0x7f, 0x83, 0xe4, 0xc1, 0xc5, 0xab, 0x6f, 0x69, 0xa5, 0xc3, 0x8f, 0x76, 0x27, 0x24, 0x36,
|
||||
0x69, 0xa3, 0xa5, 0x43, 0x8f, 0xfb, 0x90, 0x36, 0x28, 0x53, 0x67, 0x65, 0x7a, 0x6b, 0x92, 0x0e,
|
||||
0x26, 0xbb, 0x29, 0x9d, 0xf9, 0xf5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xf8, 0x9d, 0x82,
|
||||
0x33, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// VipPoolAgentClient is the client API for VipPoolAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type VipPoolAgentClient interface {
|
||||
Invoke(ctx context.Context, in *VipPoolRequest, opts ...grpc.CallOption) (*VipPoolResponse, error)
|
||||
}
|
||||
|
||||
type vipPoolAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewVipPoolAgentClient(cc *grpc.ClientConn) VipPoolAgentClient {
|
||||
return &vipPoolAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *vipPoolAgentClient) Invoke(ctx context.Context, in *VipPoolRequest, opts ...grpc.CallOption) (*VipPoolResponse, error) {
|
||||
out := new(VipPoolResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.network.VipPoolAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// VipPoolAgentServer is the server API for VipPoolAgent service.
|
||||
type VipPoolAgentServer interface {
|
||||
Invoke(context.Context, *VipPoolRequest) (*VipPoolResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedVipPoolAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedVipPoolAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedVipPoolAgentServer) Invoke(ctx context.Context, req *VipPoolRequest) (*VipPoolResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterVipPoolAgentServer(s *grpc.Server, srv VipPoolAgentServer) {
|
||||
s.RegisterService(&_VipPoolAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _VipPoolAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(VipPoolRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VipPoolAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.network.VipPoolAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VipPoolAgentServer).Invoke(ctx, req.(*VipPoolRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _VipPoolAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.network.VipPoolAgent",
|
||||
HandlerType: (*VipPoolAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _VipPoolAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "vippool.proto",
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/network";
|
||||
package moc.cloudagent.network;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
|
||||
message VipPoolRequest {
|
||||
repeated VipPool VipPools = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message VipPoolResponse {
|
||||
repeated VipPool VipPools = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message VipPool {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
string cidr = 3;
|
||||
string networkid = 4;
|
||||
string nodefqdn = 5;
|
||||
string groupName = 6;
|
||||
string locationName = 7;
|
||||
Status status = 8;
|
||||
string startip = 9;
|
||||
string endip = 10;
|
||||
}
|
||||
|
||||
service VipPoolAgent {
|
||||
rpc Invoke(VipPoolRequest) returns (VipPoolResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,608 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: virtualnetwork.proto
|
||||
|
||||
package network
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type VirtualNetworkType int32
|
||||
|
||||
const (
|
||||
VirtualNetworkType_NAT VirtualNetworkType = 0
|
||||
VirtualNetworkType_Transparent VirtualNetworkType = 1
|
||||
VirtualNetworkType_L2Bridge VirtualNetworkType = 2
|
||||
VirtualNetworkType_L2Tunnel VirtualNetworkType = 3
|
||||
VirtualNetworkType_ICS VirtualNetworkType = 4
|
||||
VirtualNetworkType_Private VirtualNetworkType = 5
|
||||
VirtualNetworkType_Overlay VirtualNetworkType = 6
|
||||
VirtualNetworkType_Internal VirtualNetworkType = 7
|
||||
VirtualNetworkType_Mirrored VirtualNetworkType = 8
|
||||
)
|
||||
|
||||
var VirtualNetworkType_name = map[int32]string{
|
||||
0: "NAT",
|
||||
1: "Transparent",
|
||||
2: "L2Bridge",
|
||||
3: "L2Tunnel",
|
||||
4: "ICS",
|
||||
5: "Private",
|
||||
6: "Overlay",
|
||||
7: "Internal",
|
||||
8: "Mirrored",
|
||||
}
|
||||
|
||||
var VirtualNetworkType_value = map[string]int32{
|
||||
"NAT": 0,
|
||||
"Transparent": 1,
|
||||
"L2Bridge": 2,
|
||||
"L2Tunnel": 3,
|
||||
"ICS": 4,
|
||||
"Private": 5,
|
||||
"Overlay": 6,
|
||||
"Internal": 7,
|
||||
"Mirrored": 8,
|
||||
}
|
||||
|
||||
func (x VirtualNetworkType) String() string {
|
||||
return proto.EnumName(VirtualNetworkType_name, int32(x))
|
||||
}
|
||||
|
||||
func (VirtualNetworkType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4ae143cdfc584285, []int{0}
|
||||
}
|
||||
|
||||
type VirtualNetworkRequest struct {
|
||||
VirtualNetworks []*VirtualNetwork `protobuf:"bytes,1,rep,name=VirtualNetworks,proto3" json:"VirtualNetworks,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualNetworkRequest) Reset() { *m = VirtualNetworkRequest{} }
|
||||
func (m *VirtualNetworkRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualNetworkRequest) ProtoMessage() {}
|
||||
func (*VirtualNetworkRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4ae143cdfc584285, []int{0}
|
||||
}
|
||||
|
||||
func (m *VirtualNetworkRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualNetworkRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualNetworkRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualNetworkRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualNetworkRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualNetworkRequest.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualNetworkRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualNetworkRequest.Size(m)
|
||||
}
|
||||
func (m *VirtualNetworkRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualNetworkRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualNetworkRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualNetworkRequest) GetVirtualNetworks() []*VirtualNetwork {
|
||||
if m != nil {
|
||||
return m.VirtualNetworks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualNetworkRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type VirtualNetworkResponse struct {
|
||||
VirtualNetworks []*VirtualNetwork `protobuf:"bytes,1,rep,name=VirtualNetworks,proto3" json:"VirtualNetworks,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualNetworkResponse) Reset() { *m = VirtualNetworkResponse{} }
|
||||
func (m *VirtualNetworkResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualNetworkResponse) ProtoMessage() {}
|
||||
func (*VirtualNetworkResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4ae143cdfc584285, []int{1}
|
||||
}
|
||||
|
||||
func (m *VirtualNetworkResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualNetworkResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualNetworkResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualNetworkResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualNetworkResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualNetworkResponse.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualNetworkResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualNetworkResponse.Size(m)
|
||||
}
|
||||
func (m *VirtualNetworkResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualNetworkResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualNetworkResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualNetworkResponse) GetVirtualNetworks() []*VirtualNetwork {
|
||||
if m != nil {
|
||||
return m.VirtualNetworks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualNetworkResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualNetworkResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type VirtualNetwork struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Subnets []*Subnet `protobuf:"bytes,3,rep,name=subnets,proto3" json:"subnets,omitempty"`
|
||||
Dns *common.Dns `protobuf:"bytes,4,opt,name=dns,proto3" json:"dns,omitempty"`
|
||||
Type VirtualNetworkType `protobuf:"varint,5,opt,name=type,proto3,enum=moc.cloudagent.network.VirtualNetworkType" json:"type,omitempty"`
|
||||
Nodefqdn string `protobuf:"bytes,6,opt,name=nodefqdn,proto3" json:"nodefqdn,omitempty"`
|
||||
GroupName string `protobuf:"bytes,7,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"`
|
||||
LocationName string `protobuf:"bytes,9,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
MacPoolName string `protobuf:"bytes,10,opt,name=macPoolName,proto3" json:"macPoolName,omitempty"`
|
||||
Vlan uint32 `protobuf:"varint,11,opt,name=vlan,proto3" json:"vlan,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) Reset() { *m = VirtualNetwork{} }
|
||||
func (m *VirtualNetwork) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualNetwork) ProtoMessage() {}
|
||||
func (*VirtualNetwork) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4ae143cdfc584285, []int{2}
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualNetwork.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualNetwork) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualNetwork.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualNetwork) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualNetwork.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualNetwork) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualNetwork.Size(m)
|
||||
}
|
||||
func (m *VirtualNetwork) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualNetwork.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualNetwork proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualNetwork) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) GetSubnets() []*Subnet {
|
||||
if m != nil {
|
||||
return m.Subnets
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) GetDns() *common.Dns {
|
||||
if m != nil {
|
||||
return m.Dns
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) GetType() VirtualNetworkType {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return VirtualNetworkType_NAT
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) GetNodefqdn() string {
|
||||
if m != nil {
|
||||
return m.Nodefqdn
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) GetMacPoolName() string {
|
||||
if m != nil {
|
||||
return m.MacPoolName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualNetwork) GetVlan() uint32 {
|
||||
if m != nil {
|
||||
return m.Vlan
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Subnet struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Cidr string `protobuf:"bytes,3,opt,name=cidr,proto3" json:"cidr,omitempty"`
|
||||
Routes []*Route `protobuf:"bytes,4,rep,name=routes,proto3" json:"routes,omitempty"`
|
||||
Allocation common.IPAllocationMethod `protobuf:"varint,5,opt,name=allocation,proto3,enum=moc.IPAllocationMethod" json:"allocation,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Subnet) Reset() { *m = Subnet{} }
|
||||
func (m *Subnet) String() string { return proto.CompactTextString(m) }
|
||||
func (*Subnet) ProtoMessage() {}
|
||||
func (*Subnet) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4ae143cdfc584285, []int{3}
|
||||
}
|
||||
|
||||
func (m *Subnet) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Subnet.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Subnet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Subnet.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Subnet) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Subnet.Merge(m, src)
|
||||
}
|
||||
func (m *Subnet) XXX_Size() int {
|
||||
return xxx_messageInfo_Subnet.Size(m)
|
||||
}
|
||||
func (m *Subnet) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Subnet.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Subnet proto.InternalMessageInfo
|
||||
|
||||
func (m *Subnet) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Subnet) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Subnet) GetCidr() string {
|
||||
if m != nil {
|
||||
return m.Cidr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Subnet) GetRoutes() []*Route {
|
||||
if m != nil {
|
||||
return m.Routes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Subnet) GetAllocation() common.IPAllocationMethod {
|
||||
if m != nil {
|
||||
return m.Allocation
|
||||
}
|
||||
return common.IPAllocationMethod_Invalid
|
||||
}
|
||||
|
||||
type Ipam struct {
|
||||
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Subnets []*Subnet `protobuf:"bytes,2,rep,name=subnets,proto3" json:"subnets,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Ipam) Reset() { *m = Ipam{} }
|
||||
func (m *Ipam) String() string { return proto.CompactTextString(m) }
|
||||
func (*Ipam) ProtoMessage() {}
|
||||
func (*Ipam) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4ae143cdfc584285, []int{4}
|
||||
}
|
||||
|
||||
func (m *Ipam) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Ipam.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Ipam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Ipam.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Ipam) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Ipam.Merge(m, src)
|
||||
}
|
||||
func (m *Ipam) XXX_Size() int {
|
||||
return xxx_messageInfo_Ipam.Size(m)
|
||||
}
|
||||
func (m *Ipam) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Ipam.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Ipam proto.InternalMessageInfo
|
||||
|
||||
func (m *Ipam) GetType() string {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Ipam) GetSubnets() []*Subnet {
|
||||
if m != nil {
|
||||
return m.Subnets
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Route struct {
|
||||
Nexthop string `protobuf:"bytes,1,opt,name=nexthop,proto3" json:"nexthop,omitempty"`
|
||||
Destinationprefix string `protobuf:"bytes,2,opt,name=destinationprefix,proto3" json:"destinationprefix,omitempty"`
|
||||
Metric uint32 `protobuf:"varint,3,opt,name=metric,proto3" json:"metric,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Route) Reset() { *m = Route{} }
|
||||
func (m *Route) String() string { return proto.CompactTextString(m) }
|
||||
func (*Route) ProtoMessage() {}
|
||||
func (*Route) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4ae143cdfc584285, []int{5}
|
||||
}
|
||||
|
||||
func (m *Route) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Route.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Route.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Route) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Route.Merge(m, src)
|
||||
}
|
||||
func (m *Route) XXX_Size() int {
|
||||
return xxx_messageInfo_Route.Size(m)
|
||||
}
|
||||
func (m *Route) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Route.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Route proto.InternalMessageInfo
|
||||
|
||||
func (m *Route) GetNexthop() string {
|
||||
if m != nil {
|
||||
return m.Nexthop
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Route) GetDestinationprefix() string {
|
||||
if m != nil {
|
||||
return m.Destinationprefix
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Route) GetMetric() uint32 {
|
||||
if m != nil {
|
||||
return m.Metric
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.cloudagent.network.VirtualNetworkType", VirtualNetworkType_name, VirtualNetworkType_value)
|
||||
proto.RegisterType((*VirtualNetworkRequest)(nil), "moc.cloudagent.network.VirtualNetworkRequest")
|
||||
proto.RegisterType((*VirtualNetworkResponse)(nil), "moc.cloudagent.network.VirtualNetworkResponse")
|
||||
proto.RegisterType((*VirtualNetwork)(nil), "moc.cloudagent.network.VirtualNetwork")
|
||||
proto.RegisterType((*Subnet)(nil), "moc.cloudagent.network.Subnet")
|
||||
proto.RegisterType((*Ipam)(nil), "moc.cloudagent.network.Ipam")
|
||||
proto.RegisterType((*Route)(nil), "moc.cloudagent.network.Route")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("virtualnetwork.proto", fileDescriptor_4ae143cdfc584285) }
|
||||
|
||||
var fileDescriptor_4ae143cdfc584285 = []byte{
|
||||
// 715 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcf, 0x4f, 0xdb, 0x48,
|
||||
0x14, 0xc6, 0xf9, 0xe1, 0x24, 0x2f, 0x10, 0xbc, 0x03, 0xcb, 0x5a, 0xd1, 0x2e, 0x8a, 0xbc, 0xd2,
|
||||
0x2a, 0x42, 0xbb, 0xb6, 0x36, 0x6d, 0xd5, 0x9e, 0x2a, 0x41, 0xdb, 0x43, 0xa4, 0x02, 0x91, 0x89,
|
||||
0x38, 0xf4, 0x36, 0xb1, 0x27, 0xc1, 0xc2, 0x9e, 0x31, 0xe3, 0x71, 0x80, 0x5b, 0xa5, 0x9e, 0xfa,
|
||||
0x57, 0xf4, 0x5f, 0xe8, 0xa1, 0x7f, 0x60, 0x35, 0xcf, 0x0e, 0x24, 0x50, 0xa4, 0xf4, 0xd0, 0x9b,
|
||||
0xdf, 0x7b, 0xdf, 0xfb, 0xe6, 0x9b, 0xef, 0x8d, 0x1f, 0xec, 0xce, 0x23, 0xa9, 0x72, 0x1a, 0x73,
|
||||
0xa6, 0xae, 0x85, 0xbc, 0x74, 0x53, 0x29, 0x94, 0x20, 0x7b, 0x89, 0x08, 0xdc, 0x20, 0x16, 0x79,
|
||||
0x48, 0x67, 0x8c, 0x2b, 0xb7, 0xac, 0x76, 0xf7, 0x67, 0x42, 0xcc, 0x62, 0xe6, 0x21, 0x6a, 0x92,
|
||||
0x4f, 0xbd, 0x6b, 0x49, 0xd3, 0x94, 0xc9, 0xac, 0xe8, 0xeb, 0x6e, 0x06, 0x22, 0x49, 0x04, 0x2f,
|
||||
0xa3, 0x9d, 0xb2, 0x6d, 0x39, 0xe9, 0x7c, 0x31, 0xe0, 0xf7, 0xf3, 0xe2, 0xcc, 0x93, 0xa2, 0xec,
|
||||
0xb3, 0xab, 0x9c, 0x65, 0x8a, 0x8c, 0x60, 0x7b, 0xb5, 0x90, 0xd9, 0x46, 0xaf, 0xda, 0x6f, 0x0f,
|
||||
0xfe, 0x71, 0x7f, 0x2c, 0xc7, 0x7d, 0xc0, 0xf3, 0xb0, 0x9d, 0x3c, 0x87, 0xad, 0xd3, 0x94, 0x49,
|
||||
0xaa, 0x22, 0xc1, 0xc7, 0xb7, 0x29, 0xb3, 0x2b, 0x3d, 0xa3, 0xdf, 0x19, 0x74, 0x90, 0xef, 0xae,
|
||||
0xe2, 0xaf, 0x82, 0x9c, 0x6f, 0x06, 0xec, 0x3d, 0x54, 0x98, 0xa5, 0x82, 0x67, 0xec, 0x17, 0x48,
|
||||
0x1c, 0x80, 0xe9, 0xb3, 0x2c, 0x8f, 0x15, 0x6a, 0x6b, 0x0f, 0xba, 0x6e, 0x61, 0xb1, 0xbb, 0xb0,
|
||||
0xd8, 0x3d, 0x12, 0x22, 0x3e, 0xa7, 0x71, 0xce, 0xfc, 0x12, 0x49, 0x76, 0xa1, 0xfe, 0x4e, 0x4a,
|
||||
0x21, 0xed, 0x6a, 0xcf, 0xe8, 0xb7, 0xfc, 0x22, 0x70, 0x3e, 0x55, 0xa1, 0xb3, 0xca, 0x4e, 0x08,
|
||||
0xd4, 0x38, 0x4d, 0x98, 0x6d, 0x20, 0x0e, 0xbf, 0x49, 0x07, 0x2a, 0x51, 0x88, 0x87, 0xb5, 0xfc,
|
||||
0x4a, 0x14, 0x92, 0x57, 0xd0, 0xc8, 0xf2, 0x09, 0x67, 0x2a, 0xb3, 0xab, 0x78, 0x95, 0xfd, 0xa7,
|
||||
0xae, 0x72, 0x86, 0x30, 0x7f, 0x01, 0x27, 0x5d, 0xa8, 0x86, 0x3c, 0xb3, 0x6b, 0xa8, 0xbb, 0x89,
|
||||
0x5d, 0x6f, 0x79, 0xe6, 0xeb, 0x24, 0x79, 0x0d, 0x35, 0xa5, 0x0d, 0xaf, 0xa3, 0xe1, 0x07, 0xeb,
|
||||
0xb9, 0xa3, 0xdd, 0xf7, 0xb1, 0x8f, 0x74, 0xa1, 0xc9, 0x45, 0xc8, 0xa6, 0x57, 0x21, 0xb7, 0x4d,
|
||||
0xd4, 0x7a, 0x17, 0x93, 0x3f, 0xa1, 0x35, 0x93, 0x22, 0x4f, 0x4f, 0xf4, 0xd5, 0x1a, 0x58, 0xbc,
|
||||
0x4f, 0x90, 0xbf, 0xc1, 0xcc, 0x14, 0x55, 0x79, 0x66, 0x37, 0x51, 0x58, 0x1b, 0xcf, 0x3e, 0xc3,
|
||||
0x94, 0x5f, 0x96, 0x88, 0x03, 0x9b, 0xb1, 0x08, 0x70, 0xe4, 0xc8, 0xd2, 0x42, 0x96, 0x95, 0x1c,
|
||||
0xe9, 0x41, 0x3b, 0xa1, 0xc1, 0x48, 0x88, 0x18, 0x21, 0x80, 0x90, 0xe5, 0x94, 0xb6, 0x77, 0x1e,
|
||||
0x53, 0x6e, 0xb7, 0x7b, 0x46, 0x7f, 0xcb, 0xc7, 0x6f, 0xe7, 0xab, 0x01, 0x66, 0x61, 0xd4, 0x5a,
|
||||
0xee, 0x13, 0xa8, 0x05, 0x51, 0xb8, 0x98, 0x24, 0x7e, 0x93, 0x17, 0x60, 0x4a, 0x91, 0x2b, 0xa6,
|
||||
0xad, 0xd5, 0x03, 0xf9, 0xeb, 0x29, 0xf7, 0x7c, 0x8d, 0xf2, 0x4b, 0x30, 0x79, 0x09, 0x40, 0xe3,
|
||||
0xc5, 0x0d, 0x4a, 0xe3, 0xff, 0xc0, 0xd6, 0xe1, 0xe8, 0xf0, 0xae, 0x70, 0xcc, 0xd4, 0x85, 0x08,
|
||||
0xfd, 0x25, 0xa8, 0x33, 0x86, 0xda, 0x30, 0xa5, 0x89, 0xd6, 0x82, 0x33, 0x2b, 0xf5, 0xe2, 0x1c,
|
||||
0x96, 0x5e, 0x47, 0xe5, 0xa7, 0x5e, 0x87, 0x33, 0x83, 0x3a, 0xea, 0x23, 0x36, 0x34, 0x38, 0xbb,
|
||||
0x51, 0x17, 0x22, 0x2d, 0x99, 0x17, 0x21, 0xf9, 0x17, 0x7e, 0x0b, 0x59, 0xa6, 0x22, 0x8e, 0x3a,
|
||||
0x52, 0xc9, 0xa6, 0xd1, 0x4d, 0xe9, 0xcd, 0xe3, 0x02, 0xd9, 0x03, 0x33, 0x61, 0x4a, 0x46, 0x01,
|
||||
0x9a, 0xb5, 0xe5, 0x97, 0xd1, 0xc1, 0x67, 0x03, 0xc8, 0xe3, 0x77, 0x44, 0x1a, 0x50, 0x3d, 0x39,
|
||||
0x1c, 0x5b, 0x1b, 0x64, 0x1b, 0xda, 0x63, 0x49, 0x79, 0x96, 0x52, 0xc9, 0xb8, 0xb2, 0x0c, 0xb2,
|
||||
0x09, 0xcd, 0xf7, 0x83, 0x23, 0x19, 0x85, 0x33, 0x66, 0x55, 0x8a, 0x68, 0x9c, 0x73, 0xce, 0x62,
|
||||
0xab, 0xaa, 0xbb, 0x86, 0x6f, 0xce, 0xac, 0x1a, 0x69, 0x43, 0x63, 0x24, 0xa3, 0x39, 0x55, 0xcc,
|
||||
0xaa, 0xeb, 0xe0, 0x74, 0xce, 0x64, 0x4c, 0x6f, 0x2d, 0x53, 0x37, 0x0c, 0xb9, 0x62, 0x92, 0xd3,
|
||||
0xd8, 0x6a, 0xe8, 0xe8, 0x38, 0xd2, 0xff, 0x1f, 0x0b, 0xad, 0xe6, 0xe0, 0xa3, 0x01, 0x3b, 0xab,
|
||||
0x5a, 0x0e, 0xb5, 0x49, 0x24, 0x02, 0x73, 0xc8, 0xe7, 0xe2, 0x92, 0x91, 0xff, 0xd6, 0x5c, 0x14,
|
||||
0xc5, 0x4e, 0xec, 0xba, 0xeb, 0xc2, 0x8b, 0x05, 0xe5, 0x6c, 0x1c, 0xfd, 0xff, 0xc1, 0x9b, 0x45,
|
||||
0xea, 0x22, 0x9f, 0xb8, 0x81, 0x48, 0xbc, 0x24, 0x0a, 0xa4, 0xc8, 0xc4, 0x54, 0x79, 0x89, 0x08,
|
||||
0x3c, 0x99, 0x06, 0xde, 0x3d, 0x97, 0x57, 0x72, 0x4d, 0x4c, 0xdc, 0x35, 0xcf, 0xbe, 0x07, 0x00,
|
||||
0x00, 0xff, 0xff, 0xce, 0x80, 0x0c, 0x96, 0x0c, 0x06, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// VirtualNetworkAgentClient is the client API for VirtualNetworkAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type VirtualNetworkAgentClient interface {
|
||||
Invoke(ctx context.Context, in *VirtualNetworkRequest, opts ...grpc.CallOption) (*VirtualNetworkResponse, error)
|
||||
}
|
||||
|
||||
type virtualNetworkAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewVirtualNetworkAgentClient(cc *grpc.ClientConn) VirtualNetworkAgentClient {
|
||||
return &virtualNetworkAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *virtualNetworkAgentClient) Invoke(ctx context.Context, in *VirtualNetworkRequest, opts ...grpc.CallOption) (*VirtualNetworkResponse, error) {
|
||||
out := new(VirtualNetworkResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.network.VirtualNetworkAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// VirtualNetworkAgentServer is the server API for VirtualNetworkAgent service.
|
||||
type VirtualNetworkAgentServer interface {
|
||||
Invoke(context.Context, *VirtualNetworkRequest) (*VirtualNetworkResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedVirtualNetworkAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedVirtualNetworkAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedVirtualNetworkAgentServer) Invoke(ctx context.Context, req *VirtualNetworkRequest) (*VirtualNetworkResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterVirtualNetworkAgentServer(s *grpc.Server, srv VirtualNetworkAgentServer) {
|
||||
s.RegisterService(&_VirtualNetworkAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _VirtualNetworkAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(VirtualNetworkRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VirtualNetworkAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.network.VirtualNetworkAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VirtualNetworkAgentServer).Invoke(ctx, req.(*VirtualNetworkRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _VirtualNetworkAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.network.VirtualNetworkAgent",
|
||||
HandlerType: (*VirtualNetworkAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _VirtualNetworkAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "virtualnetwork.proto",
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/network";
|
||||
package moc.cloudagent.network;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
import "networkcommon.proto";
|
||||
|
||||
enum VirtualNetworkType {
|
||||
NAT = 0;
|
||||
Transparent = 1;
|
||||
L2Bridge = 2;
|
||||
L2Tunnel = 3;
|
||||
ICS = 4;
|
||||
Private = 5;
|
||||
Overlay = 6;
|
||||
Internal = 7;
|
||||
Mirrored = 8;
|
||||
}
|
||||
|
||||
message VirtualNetworkRequest {
|
||||
repeated VirtualNetwork VirtualNetworks = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message VirtualNetworkResponse {
|
||||
repeated VirtualNetwork VirtualNetworks = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message VirtualNetwork {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
repeated Subnet subnets = 3;
|
||||
Dns dns = 4;
|
||||
VirtualNetworkType type = 5;
|
||||
string nodefqdn = 6;
|
||||
string groupName = 7;
|
||||
Status status = 8;
|
||||
string locationName = 9;
|
||||
string macPoolName = 10;
|
||||
uint32 vlan = 11;
|
||||
}
|
||||
|
||||
message Subnet {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
string cidr = 3;
|
||||
repeated Route routes = 4;
|
||||
IPAllocationMethod allocation = 5;
|
||||
}
|
||||
message Ipam {
|
||||
string type = 1;
|
||||
repeated Subnet subnets = 2;
|
||||
}
|
||||
message Route {
|
||||
string nexthop = 1;
|
||||
string destinationprefix = 2;
|
||||
uint32 metric = 3;
|
||||
}
|
||||
|
||||
service VirtualNetworkAgent {
|
||||
rpc Invoke(VirtualNetworkRequest) returns (VirtualNetworkResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: authentication.proto
|
||||
|
||||
package security
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type AuthenticationRequest struct {
|
||||
Identity *Identity `protobuf:"bytes,1,opt,name=Identity,proto3" json:"Identity,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *AuthenticationRequest) Reset() { *m = AuthenticationRequest{} }
|
||||
func (m *AuthenticationRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*AuthenticationRequest) ProtoMessage() {}
|
||||
func (*AuthenticationRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d0dbc99083440df2, []int{0}
|
||||
}
|
||||
|
||||
func (m *AuthenticationRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AuthenticationRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *AuthenticationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_AuthenticationRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *AuthenticationRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_AuthenticationRequest.Merge(m, src)
|
||||
}
|
||||
func (m *AuthenticationRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_AuthenticationRequest.Size(m)
|
||||
}
|
||||
func (m *AuthenticationRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_AuthenticationRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_AuthenticationRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *AuthenticationRequest) GetIdentity() *Identity {
|
||||
if m != nil {
|
||||
return m.Identity
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AuthenticationResponse struct {
|
||||
Token string `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *AuthenticationResponse) Reset() { *m = AuthenticationResponse{} }
|
||||
func (m *AuthenticationResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*AuthenticationResponse) ProtoMessage() {}
|
||||
func (*AuthenticationResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d0dbc99083440df2, []int{1}
|
||||
}
|
||||
|
||||
func (m *AuthenticationResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AuthenticationResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *AuthenticationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_AuthenticationResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *AuthenticationResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_AuthenticationResponse.Merge(m, src)
|
||||
}
|
||||
func (m *AuthenticationResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_AuthenticationResponse.Size(m)
|
||||
}
|
||||
func (m *AuthenticationResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_AuthenticationResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_AuthenticationResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *AuthenticationResponse) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *AuthenticationResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AuthenticationResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*AuthenticationRequest)(nil), "moc.cloudagent.security.AuthenticationRequest")
|
||||
proto.RegisterType((*AuthenticationResponse)(nil), "moc.cloudagent.security.AuthenticationResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("authentication.proto", fileDescriptor_d0dbc99083440df2) }
|
||||
|
||||
var fileDescriptor_d0dbc99083440df2 = []byte{
|
||||
// 282 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x31, 0x4f, 0xeb, 0x30,
|
||||
0x14, 0x85, 0x5f, 0x1e, 0x6a, 0x05, 0x46, 0x62, 0x30, 0x05, 0xa2, 0x0c, 0x08, 0x32, 0x31, 0xd9,
|
||||
0x28, 0xcc, 0x0c, 0xad, 0xc4, 0x80, 0xc4, 0x14, 0xa1, 0x0e, 0x6c, 0x89, 0x7b, 0x9b, 0x1a, 0x12,
|
||||
0xdf, 0x60, 0x5f, 0x0b, 0x3a, 0xf2, 0xcf, 0x51, 0xe2, 0x06, 0x54, 0x44, 0x25, 0xc6, 0x23, 0x9d,
|
||||
0xfb, 0x1d, 0x7f, 0x66, 0x93, 0xc2, 0xd3, 0x0a, 0x0c, 0x69, 0x55, 0x90, 0x46, 0x23, 0x5a, 0x8b,
|
||||
0x84, 0xfc, 0xac, 0x41, 0x25, 0x54, 0x8d, 0x7e, 0x51, 0x54, 0x60, 0x48, 0x38, 0x50, 0xde, 0x6a,
|
||||
0x5a, 0x27, 0xe7, 0x15, 0x62, 0x55, 0x83, 0xec, 0x6b, 0xa5, 0x5f, 0xca, 0x37, 0x5b, 0xb4, 0x2d,
|
||||
0x58, 0x17, 0x0e, 0x93, 0x23, 0xbd, 0xe8, 0x60, 0xb4, 0x0e, 0x39, 0x9d, 0xb3, 0x93, 0xe9, 0xd6,
|
||||
0x40, 0x0e, 0xaf, 0x1e, 0x1c, 0xf1, 0x5b, 0xb6, 0x7f, 0xbf, 0xa9, 0xc6, 0xd1, 0x45, 0x74, 0x75,
|
||||
0x98, 0x5d, 0x8a, 0x1d, 0xa3, 0x62, 0x28, 0xe6, 0x5f, 0x27, 0xe9, 0x3b, 0x3b, 0xfd, 0xc9, 0x75,
|
||||
0x2d, 0x1a, 0x07, 0x7c, 0xc2, 0x46, 0x8f, 0xf8, 0x02, 0xa6, 0xa7, 0x1e, 0xe4, 0x21, 0xf0, 0x8c,
|
||||
0x8d, 0x73, 0x70, 0xbe, 0xa6, 0xf8, 0x7f, 0x3f, 0x96, 0x88, 0x20, 0x22, 0x06, 0x11, 0x31, 0x43,
|
||||
0xac, 0xe7, 0x45, 0xed, 0x21, 0xdf, 0x34, 0x3b, 0xd2, 0x9d, 0xb5, 0x68, 0xe3, 0xbd, 0x40, 0xea,
|
||||
0x43, 0xf6, 0x11, 0xb1, 0xe3, 0xed, 0xe9, 0x69, 0xf7, 0x5a, 0xfe, 0xcc, 0x46, 0x0f, 0x58, 0x69,
|
||||
0xc3, 0xc5, 0x4e, 0x8f, 0x5f, 0x7f, 0x22, 0x91, 0x7f, 0xee, 0x07, 0xc3, 0xf4, 0xdf, 0x2c, 0x7b,
|
||||
0xba, 0xae, 0x34, 0xad, 0x7c, 0x29, 0x14, 0x36, 0xb2, 0xd1, 0xca, 0xa2, 0xc3, 0x25, 0xc9, 0x06,
|
||||
0x95, 0xb4, 0xad, 0x92, 0xdf, 0x30, 0x39, 0xc0, 0xca, 0x71, 0x6f, 0x7a, 0xf3, 0x19, 0x00, 0x00,
|
||||
0xff, 0xff, 0x19, 0x33, 0x61, 0x1e, 0xf1, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// AuthenticationAgentClient is the client API for AuthenticationAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type AuthenticationAgentClient interface {
|
||||
Login(ctx context.Context, in *AuthenticationRequest, opts ...grpc.CallOption) (*AuthenticationResponse, error)
|
||||
}
|
||||
|
||||
type authenticationAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewAuthenticationAgentClient(cc *grpc.ClientConn) AuthenticationAgentClient {
|
||||
return &authenticationAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *authenticationAgentClient) Login(ctx context.Context, in *AuthenticationRequest, opts ...grpc.CallOption) (*AuthenticationResponse, error) {
|
||||
out := new(AuthenticationResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.security.AuthenticationAgent/Login", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// AuthenticationAgentServer is the server API for AuthenticationAgent service.
|
||||
type AuthenticationAgentServer interface {
|
||||
Login(context.Context, *AuthenticationRequest) (*AuthenticationResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedAuthenticationAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedAuthenticationAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedAuthenticationAgentServer) Login(ctx context.Context, req *AuthenticationRequest) (*AuthenticationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
|
||||
}
|
||||
|
||||
func RegisterAuthenticationAgentServer(s *grpc.Server, srv AuthenticationAgentServer) {
|
||||
s.RegisterService(&_AuthenticationAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _AuthenticationAgent_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AuthenticationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AuthenticationAgentServer).Login(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.security.AuthenticationAgent/Login",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AuthenticationAgentServer).Login(ctx, req.(*AuthenticationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _AuthenticationAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.security.AuthenticationAgent",
|
||||
HandlerType: (*AuthenticationAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Login",
|
||||
Handler: _AuthenticationAgent_Login_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "authentication.proto",
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/security";
|
||||
package moc.cloudagent.security;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "identity.proto";
|
||||
|
||||
message AuthenticationRequest {
|
||||
Identity Identity = 1;
|
||||
}
|
||||
|
||||
message AuthenticationResponse {
|
||||
string Token = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
service AuthenticationAgent {
|
||||
rpc Login(AuthenticationRequest) returns (AuthenticationResponse) {}
|
||||
}
|
|
@ -0,0 +1,452 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: certificate.proto
|
||||
|
||||
package security
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type CertificateType int32
|
||||
|
||||
const (
|
||||
CertificateType_Client CertificateType = 0
|
||||
CertificateType_Server CertificateType = 1
|
||||
)
|
||||
|
||||
var CertificateType_name = map[int32]string{
|
||||
0: "Client",
|
||||
1: "Server",
|
||||
}
|
||||
|
||||
var CertificateType_value = map[string]int32{
|
||||
"Client": 0,
|
||||
"Server": 1,
|
||||
}
|
||||
|
||||
func (x CertificateType) String() string {
|
||||
return proto.EnumName(CertificateType_name, int32(x))
|
||||
}
|
||||
|
||||
func (CertificateType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c0d34c34dd33be4b, []int{0}
|
||||
}
|
||||
|
||||
type CertificateRequest struct {
|
||||
Certificates []*Certificate `protobuf:"bytes,1,rep,name=Certificates,proto3" json:"Certificates,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CertificateRequest) Reset() { *m = CertificateRequest{} }
|
||||
func (m *CertificateRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*CertificateRequest) ProtoMessage() {}
|
||||
func (*CertificateRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c0d34c34dd33be4b, []int{0}
|
||||
}
|
||||
|
||||
func (m *CertificateRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CertificateRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CertificateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CertificateRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CertificateRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CertificateRequest.Merge(m, src)
|
||||
}
|
||||
func (m *CertificateRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_CertificateRequest.Size(m)
|
||||
}
|
||||
func (m *CertificateRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CertificateRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CertificateRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *CertificateRequest) GetCertificates() []*Certificate {
|
||||
if m != nil {
|
||||
return m.Certificates
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type CertificateResponse struct {
|
||||
Certificates []*Certificate `protobuf:"bytes,1,rep,name=Certificates,proto3" json:"Certificates,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *CertificateResponse) Reset() { *m = CertificateResponse{} }
|
||||
func (m *CertificateResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*CertificateResponse) ProtoMessage() {}
|
||||
func (*CertificateResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c0d34c34dd33be4b, []int{1}
|
||||
}
|
||||
|
||||
func (m *CertificateResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CertificateResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *CertificateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_CertificateResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *CertificateResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_CertificateResponse.Merge(m, src)
|
||||
}
|
||||
func (m *CertificateResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_CertificateResponse.Size(m)
|
||||
}
|
||||
func (m *CertificateResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_CertificateResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_CertificateResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *CertificateResponse) GetCertificates() []*Certificate {
|
||||
if m != nil {
|
||||
return m.Certificates
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CertificateResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CertificateResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Certificate struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
NotBefore int64 `protobuf:"varint,3,opt,name=notBefore,proto3" json:"notBefore,omitempty"`
|
||||
NotAfter int64 `protobuf:"varint,4,opt,name=notAfter,proto3" json:"notAfter,omitempty"`
|
||||
Certificate []byte `protobuf:"bytes,5,opt,name=certificate,proto3" json:"certificate,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Type CertificateType `protobuf:"varint,7,opt,name=type,proto3,enum=moc.cloudagent.security.CertificateType" json:"type,omitempty"`
|
||||
GroupName string `protobuf:"bytes,8,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
VaultName string `protobuf:"bytes,9,opt,name=vaultName,proto3" json:"vaultName,omitempty"`
|
||||
LocationName string `protobuf:"bytes,10,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Certificate) Reset() { *m = Certificate{} }
|
||||
func (m *Certificate) String() string { return proto.CompactTextString(m) }
|
||||
func (*Certificate) ProtoMessage() {}
|
||||
func (*Certificate) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c0d34c34dd33be4b, []int{2}
|
||||
}
|
||||
|
||||
func (m *Certificate) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Certificate.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Certificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Certificate.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Certificate) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Certificate.Merge(m, src)
|
||||
}
|
||||
func (m *Certificate) XXX_Size() int {
|
||||
return xxx_messageInfo_Certificate.Size(m)
|
||||
}
|
||||
func (m *Certificate) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Certificate.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Certificate proto.InternalMessageInfo
|
||||
|
||||
func (m *Certificate) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Certificate) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Certificate) GetNotBefore() int64 {
|
||||
if m != nil {
|
||||
return m.NotBefore
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Certificate) GetNotAfter() int64 {
|
||||
if m != nil {
|
||||
return m.NotAfter
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Certificate) GetCertificate() []byte {
|
||||
if m != nil {
|
||||
return m.Certificate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Certificate) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Certificate) GetType() CertificateType {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return CertificateType_Client
|
||||
}
|
||||
|
||||
func (m *Certificate) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Certificate) GetVaultName() string {
|
||||
if m != nil {
|
||||
return m.VaultName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Certificate) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.cloudagent.security.CertificateType", CertificateType_name, CertificateType_value)
|
||||
proto.RegisterType((*CertificateRequest)(nil), "moc.cloudagent.security.CertificateRequest")
|
||||
proto.RegisterType((*CertificateResponse)(nil), "moc.cloudagent.security.CertificateResponse")
|
||||
proto.RegisterType((*Certificate)(nil), "moc.cloudagent.security.Certificate")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("certificate.proto", fileDescriptor_c0d34c34dd33be4b) }
|
||||
|
||||
var fileDescriptor_c0d34c34dd33be4b = []byte{
|
||||
// 480 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x4d, 0x6f, 0xd3, 0x40,
|
||||
0x10, 0xad, 0x93, 0xd6, 0x34, 0x93, 0x28, 0x84, 0x05, 0x09, 0x2b, 0x42, 0xc8, 0x0a, 0x1c, 0xcc,
|
||||
0x87, 0x6c, 0x64, 0xae, 0x5c, 0x9a, 0x80, 0xe0, 0x04, 0x92, 0x0b, 0x1c, 0x38, 0x20, 0x39, 0x9b,
|
||||
0xb1, 0xb1, 0x64, 0x7b, 0xcc, 0xee, 0x6c, 0x51, 0x7e, 0x12, 0xff, 0x85, 0x03, 0x3f, 0x09, 0x79,
|
||||
0xdd, 0x36, 0x0e, 0x12, 0x52, 0x0e, 0xf4, 0xb6, 0xfb, 0xe6, 0xcd, 0x7b, 0x3b, 0xcf, 0x63, 0xb8,
|
||||
0x23, 0x51, 0x71, 0x91, 0x15, 0x32, 0x65, 0x0c, 0x1b, 0x45, 0x4c, 0xe2, 0x7e, 0x45, 0x32, 0x94,
|
||||
0x25, 0x99, 0x4d, 0x9a, 0x63, 0xcd, 0xa1, 0x46, 0x69, 0x54, 0xc1, 0xdb, 0xf9, 0xc3, 0x9c, 0x28,
|
||||
0x2f, 0x31, 0xb2, 0xb4, 0xb5, 0xc9, 0xa2, 0x1f, 0x2a, 0x6d, 0x1a, 0x54, 0xba, 0x6b, 0x9c, 0x4f,
|
||||
0x24, 0x55, 0x15, 0xd5, 0xdd, 0x6d, 0xf1, 0x15, 0xc4, 0x6a, 0xa7, 0x9d, 0xe0, 0x77, 0x83, 0x9a,
|
||||
0xc5, 0x3b, 0x98, 0xf4, 0x50, 0xed, 0x39, 0xfe, 0x30, 0x18, 0xc7, 0x8f, 0xc3, 0x7f, 0x78, 0x86,
|
||||
0x7d, 0x89, 0xbd, 0xce, 0xc5, 0x4f, 0x07, 0xee, 0xee, 0x19, 0xe8, 0x86, 0x6a, 0x8d, 0xff, 0xcf,
|
||||
0x41, 0xc4, 0xe0, 0x26, 0xa8, 0x4d, 0xc9, 0xde, 0xc0, 0x77, 0x82, 0x71, 0x3c, 0x0f, 0xbb, 0x00,
|
||||
0xc2, 0xab, 0x00, 0xc2, 0x25, 0x51, 0xf9, 0x39, 0x2d, 0x0d, 0x26, 0x97, 0x4c, 0x71, 0x0f, 0x4e,
|
||||
0xde, 0x28, 0x45, 0xca, 0x1b, 0xfa, 0x4e, 0x30, 0x4a, 0xba, 0xcb, 0xe2, 0xf7, 0x00, 0xc6, 0x3d,
|
||||
0x69, 0x21, 0xe0, 0xb8, 0x4e, 0x2b, 0xf4, 0x1c, 0x4b, 0xb2, 0x67, 0x31, 0x85, 0x41, 0xb1, 0xb1,
|
||||
0x4e, 0xa3, 0x64, 0x50, 0x6c, 0xc4, 0x03, 0x18, 0xd5, 0xc4, 0x4b, 0xcc, 0x48, 0xa1, 0x55, 0x1b,
|
||||
0x26, 0x3b, 0x40, 0xcc, 0xe1, 0xb4, 0x26, 0x3e, 0xcb, 0x18, 0x95, 0x77, 0x6c, 0x8b, 0xd7, 0x77,
|
||||
0xe1, 0xc3, 0xb8, 0xf7, 0x55, 0xbd, 0x13, 0xdf, 0x09, 0x26, 0x49, 0x1f, 0x12, 0x8f, 0xc0, 0xd5,
|
||||
0x9c, 0xb2, 0xd1, 0x9e, 0x6b, 0x27, 0x1b, 0xdb, 0x74, 0xce, 0x2d, 0x94, 0x5c, 0x96, 0xc4, 0x2b,
|
||||
0x38, 0xe6, 0x6d, 0x83, 0xde, 0x2d, 0xdf, 0x09, 0xa6, 0x71, 0x70, 0x48, 0x80, 0x1f, 0xb7, 0x0d,
|
||||
0x26, 0xb6, 0xab, 0x7d, 0x7e, 0xae, 0xc8, 0x34, 0xef, 0xdb, 0x39, 0x4f, 0xed, 0x54, 0x3b, 0xa0,
|
||||
0xad, 0x5e, 0xa4, 0xa6, 0x64, 0x5b, 0x1d, 0x75, 0xd5, 0x6b, 0x40, 0x2c, 0x60, 0x52, 0x92, 0x4c,
|
||||
0xb9, 0xa0, 0xda, 0x12, 0xc0, 0x12, 0xf6, 0xb0, 0xa7, 0x4f, 0xe0, 0xf6, 0x5f, 0xc6, 0x02, 0xc0,
|
||||
0x5d, 0x95, 0x05, 0xd6, 0x3c, 0x3b, 0x6a, 0xcf, 0xe7, 0xa8, 0x2e, 0x50, 0xcd, 0x9c, 0xf8, 0xd7,
|
||||
0x00, 0x66, 0x3d, 0xee, 0x59, 0xfb, 0x7c, 0x51, 0xc1, 0x74, 0xa5, 0x30, 0x65, 0xfc, 0xa0, 0x3e,
|
||||
0x35, 0x9b, 0x36, 0x94, 0x67, 0x07, 0xad, 0x48, 0xb7, 0xc7, 0xf3, 0xe7, 0x87, 0x91, 0xbb, 0x9d,
|
||||
0x5c, 0x1c, 0x89, 0x35, 0x0c, 0xdf, 0x22, 0xdf, 0xac, 0x07, 0x82, 0xfb, 0x1a, 0x4b, 0xbc, 0xe1,
|
||||
0x51, 0x96, 0xf1, 0x97, 0x17, 0x79, 0xc1, 0xdf, 0xcc, 0x3a, 0x94, 0x54, 0x45, 0x55, 0x21, 0x15,
|
||||
0x69, 0xca, 0x38, 0xaa, 0x48, 0x46, 0xaa, 0x91, 0xd1, 0x4e, 0x29, 0xba, 0x52, 0x5a, 0xbb, 0xf6,
|
||||
0x97, 0x79, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0x4e, 0xcf, 0xbe, 0x93, 0x6f, 0x04, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// CertificateAgentClient is the client API for CertificateAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type CertificateAgentClient interface {
|
||||
CreateOrUpdate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
|
||||
Get(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
|
||||
Delete(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
|
||||
}
|
||||
|
||||
type certificateAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewCertificateAgentClient(cc *grpc.ClientConn) CertificateAgentClient {
|
||||
return &certificateAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *certificateAgentClient) CreateOrUpdate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error) {
|
||||
out := new(CertificateResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.security.CertificateAgent/CreateOrUpdate", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *certificateAgentClient) Get(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error) {
|
||||
out := new(CertificateResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.security.CertificateAgent/Get", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *certificateAgentClient) Delete(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error) {
|
||||
out := new(CertificateResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.security.CertificateAgent/Delete", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// CertificateAgentServer is the server API for CertificateAgent service.
|
||||
type CertificateAgentServer interface {
|
||||
CreateOrUpdate(context.Context, *CertificateRequest) (*CertificateResponse, error)
|
||||
Get(context.Context, *CertificateRequest) (*CertificateResponse, error)
|
||||
Delete(context.Context, *CertificateRequest) (*CertificateResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedCertificateAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedCertificateAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedCertificateAgentServer) CreateOrUpdate(ctx context.Context, req *CertificateRequest) (*CertificateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateOrUpdate not implemented")
|
||||
}
|
||||
func (*UnimplementedCertificateAgentServer) Get(ctx context.Context, req *CertificateRequest) (*CertificateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (*UnimplementedCertificateAgentServer) Delete(ctx context.Context, req *CertificateRequest) (*CertificateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||
}
|
||||
|
||||
func RegisterCertificateAgentServer(s *grpc.Server, srv CertificateAgentServer) {
|
||||
s.RegisterService(&_CertificateAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _CertificateAgent_CreateOrUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CertificateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CertificateAgentServer).CreateOrUpdate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.security.CertificateAgent/CreateOrUpdate",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CertificateAgentServer).CreateOrUpdate(ctx, req.(*CertificateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _CertificateAgent_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CertificateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CertificateAgentServer).Get(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.security.CertificateAgent/Get",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CertificateAgentServer).Get(ctx, req.(*CertificateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _CertificateAgent_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CertificateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(CertificateAgentServer).Delete(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.security.CertificateAgent/Delete",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(CertificateAgentServer).Delete(ctx, req.(*CertificateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _CertificateAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.security.CertificateAgent",
|
||||
HandlerType: (*CertificateAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CreateOrUpdate",
|
||||
Handler: _CertificateAgent_CreateOrUpdate_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Get",
|
||||
Handler: _CertificateAgent_Get_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Delete",
|
||||
Handler: _CertificateAgent_Delete_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "certificate.proto",
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/security";
|
||||
package moc.cloudagent.security;
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
enum CertificateType {
|
||||
Client = 0;
|
||||
Server = 1;
|
||||
}
|
||||
|
||||
message CertificateRequest {
|
||||
repeated Certificate Certificates = 1;
|
||||
}
|
||||
|
||||
message CertificateResponse {
|
||||
repeated Certificate Certificates = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message Certificate {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
int64 notBefore = 3;
|
||||
int64 notAfter = 4;
|
||||
bytes certificate = 5;
|
||||
Status status = 6;
|
||||
CertificateType type = 7;
|
||||
string groupName = 8;
|
||||
string vaultName = 9;
|
||||
string locationName = 10;
|
||||
}
|
||||
|
||||
service CertificateAgent {
|
||||
rpc CreateOrUpdate(CertificateRequest) returns (CertificateResponse) {}
|
||||
rpc Get(CertificateRequest) returns (CertificateResponse) {}
|
||||
rpc Delete(CertificateRequest) returns (CertificateResponse) {}
|
||||
}
|
|
@ -0,0 +1,343 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: identity.proto
|
||||
|
||||
package security
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type IdentityRequest struct {
|
||||
Identitys []*Identity `protobuf:"bytes,1,rep,name=Identitys,proto3" json:"Identitys,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *IdentityRequest) Reset() { *m = IdentityRequest{} }
|
||||
func (m *IdentityRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*IdentityRequest) ProtoMessage() {}
|
||||
func (*IdentityRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_61c7956abb761639, []int{0}
|
||||
}
|
||||
|
||||
func (m *IdentityRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_IdentityRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *IdentityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_IdentityRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *IdentityRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_IdentityRequest.Merge(m, src)
|
||||
}
|
||||
func (m *IdentityRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_IdentityRequest.Size(m)
|
||||
}
|
||||
func (m *IdentityRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_IdentityRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_IdentityRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *IdentityRequest) GetIdentitys() []*Identity {
|
||||
if m != nil {
|
||||
return m.Identitys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IdentityRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type IdentityResponse struct {
|
||||
Identitys []*Identity `protobuf:"bytes,1,rep,name=Identitys,proto3" json:"Identitys,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *IdentityResponse) Reset() { *m = IdentityResponse{} }
|
||||
func (m *IdentityResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*IdentityResponse) ProtoMessage() {}
|
||||
func (*IdentityResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_61c7956abb761639, []int{1}
|
||||
}
|
||||
|
||||
func (m *IdentityResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_IdentityResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *IdentityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_IdentityResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *IdentityResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_IdentityResponse.Merge(m, src)
|
||||
}
|
||||
func (m *IdentityResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_IdentityResponse.Size(m)
|
||||
}
|
||||
func (m *IdentityResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_IdentityResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_IdentityResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *IdentityResponse) GetIdentitys() []*Identity {
|
||||
if m != nil {
|
||||
return m.Identitys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IdentityResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *IdentityResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Identity struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
ResourceGroup string `protobuf:"bytes,3,opt,name=resourceGroup,proto3" json:"resourceGroup,omitempty"`
|
||||
Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
|
||||
Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"`
|
||||
Certificate []byte `protobuf:"bytes,6,opt,name=certificate,proto3" json:"certificate,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
|
||||
LocationName string `protobuf:"bytes,10,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Identity) Reset() { *m = Identity{} }
|
||||
func (m *Identity) String() string { return proto.CompactTextString(m) }
|
||||
func (*Identity) ProtoMessage() {}
|
||||
func (*Identity) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_61c7956abb761639, []int{2}
|
||||
}
|
||||
|
||||
func (m *Identity) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Identity.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Identity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Identity.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Identity) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Identity.Merge(m, src)
|
||||
}
|
||||
func (m *Identity) XXX_Size() int {
|
||||
return xxx_messageInfo_Identity.Size(m)
|
||||
}
|
||||
func (m *Identity) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Identity.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Identity proto.InternalMessageInfo
|
||||
|
||||
func (m *Identity) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Identity) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Identity) GetResourceGroup() string {
|
||||
if m != nil {
|
||||
return m.ResourceGroup
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Identity) GetPassword() string {
|
||||
if m != nil {
|
||||
return m.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Identity) GetToken() string {
|
||||
if m != nil {
|
||||
return m.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Identity) GetCertificate() []byte {
|
||||
if m != nil {
|
||||
return m.Certificate
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Identity) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Identity) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*IdentityRequest)(nil), "moc.cloudagent.security.IdentityRequest")
|
||||
proto.RegisterType((*IdentityResponse)(nil), "moc.cloudagent.security.IdentityResponse")
|
||||
proto.RegisterType((*Identity)(nil), "moc.cloudagent.security.Identity")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("identity.proto", fileDescriptor_61c7956abb761639) }
|
||||
|
||||
var fileDescriptor_61c7956abb761639 = []byte{
|
||||
// 427 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0xcb, 0x8e, 0xd3, 0x40,
|
||||
0x10, 0xc4, 0xd9, 0x5d, 0xb3, 0xe9, 0x3c, 0x40, 0x23, 0x24, 0x2c, 0x1f, 0x90, 0x31, 0x1c, 0xcc,
|
||||
0x65, 0x8c, 0x0c, 0x77, 0xc4, 0x4a, 0x08, 0xed, 0x05, 0x24, 0x83, 0x38, 0x70, 0x41, 0xce, 0xb8,
|
||||
0x13, 0x46, 0x6b, 0xbb, 0x87, 0x79, 0x10, 0xe5, 0x0f, 0xf8, 0x09, 0x3e, 0x92, 0x3f, 0x40, 0x19,
|
||||
0xdb, 0x09, 0x39, 0x20, 0x90, 0xf6, 0xe6, 0xae, 0xa9, 0xae, 0xae, 0xae, 0x36, 0x2c, 0x65, 0x8d,
|
||||
0x9d, 0x95, 0x76, 0xc7, 0x95, 0x26, 0x4b, 0xec, 0x61, 0x4b, 0x82, 0x8b, 0x86, 0x5c, 0x5d, 0x6d,
|
||||
0xb0, 0xb3, 0xdc, 0xa0, 0x70, 0x5a, 0xda, 0x5d, 0xfc, 0x68, 0x43, 0xb4, 0x69, 0x30, 0xf7, 0xb4,
|
||||
0x95, 0x5b, 0xe7, 0x5b, 0x5d, 0x29, 0x85, 0xda, 0xf4, 0x8d, 0xf1, 0x5c, 0x50, 0xdb, 0x52, 0xd7,
|
||||
0x57, 0xe9, 0x8f, 0x00, 0xee, 0x5d, 0x0f, 0xca, 0x25, 0x7e, 0x73, 0x68, 0x2c, 0x7b, 0x05, 0xd3,
|
||||
0x11, 0x32, 0x51, 0x90, 0x9c, 0x65, 0xb3, 0xe2, 0x31, 0xff, 0xcb, 0x38, 0x7e, 0x68, 0x3e, 0xf6,
|
||||
0xb0, 0x97, 0xb0, 0x78, 0xaf, 0x50, 0x57, 0x56, 0x52, 0xf7, 0x71, 0xa7, 0x30, 0x9a, 0x24, 0x41,
|
||||
0xb6, 0x2c, 0x96, 0x5e, 0xe4, 0xf0, 0x52, 0x9e, 0x92, 0xd2, 0x9f, 0x01, 0xdc, 0x3f, 0x5a, 0x31,
|
||||
0x8a, 0x3a, 0x83, 0xb7, 0xf7, 0x52, 0x40, 0x58, 0xa2, 0x71, 0x8d, 0xf5, 0x26, 0x66, 0x45, 0xcc,
|
||||
0xfb, 0x7c, 0xf8, 0x98, 0x0f, 0xbf, 0x22, 0x6a, 0x3e, 0x55, 0x8d, 0xc3, 0x72, 0x60, 0xb2, 0x07,
|
||||
0x70, 0xf1, 0x46, 0x6b, 0xd2, 0xd1, 0x59, 0x12, 0x64, 0xd3, 0xb2, 0x2f, 0xd2, 0x5f, 0x01, 0x5c,
|
||||
0x8e, 0xba, 0x8c, 0xc1, 0x79, 0x57, 0xb5, 0x18, 0x05, 0x9e, 0xe1, 0xbf, 0xd9, 0x12, 0x26, 0xb2,
|
||||
0xf6, 0x63, 0xa6, 0xe5, 0x44, 0xd6, 0xec, 0x29, 0x2c, 0x34, 0x1a, 0x72, 0x5a, 0xe0, 0x5b, 0x4d,
|
||||
0x4e, 0x0d, 0x72, 0xa7, 0x20, 0x8b, 0xe1, 0x52, 0x55, 0xc6, 0x6c, 0x49, 0xd7, 0xd1, 0xb9, 0x27,
|
||||
0x1c, 0xea, 0xbd, 0x11, 0x4b, 0x37, 0xd8, 0x45, 0x17, 0xbd, 0x11, 0x5f, 0xb0, 0x04, 0x66, 0x02,
|
||||
0xb5, 0x95, 0x6b, 0x29, 0x2a, 0x8b, 0x51, 0x98, 0x04, 0xd9, 0xbc, 0xfc, 0x13, 0x62, 0x4f, 0x20,
|
||||
0x34, 0xb6, 0xb2, 0xce, 0x44, 0x77, 0xfd, 0xd2, 0x33, 0x1f, 0xd9, 0x07, 0x0f, 0x95, 0xc3, 0x13,
|
||||
0x4b, 0x61, 0xde, 0x90, 0xf0, 0xf9, 0xbf, 0xdb, 0xaf, 0x02, 0x7e, 0xc6, 0x09, 0x56, 0x28, 0x58,
|
||||
0x8c, 0x2b, 0xbf, 0xde, 0x67, 0xcd, 0xbe, 0x40, 0x78, 0xdd, 0x7d, 0xa7, 0x1b, 0x64, 0xd9, 0xbf,
|
||||
0xcf, 0xd0, 0xff, 0x4f, 0xf1, 0xb3, 0xff, 0x60, 0xf6, 0xe7, 0x4e, 0xef, 0x5c, 0x15, 0x9f, 0x9f,
|
||||
0x6f, 0xa4, 0xfd, 0xea, 0x56, 0x5c, 0x50, 0x9b, 0xb7, 0x52, 0x68, 0x32, 0xb4, 0xb6, 0x79, 0x4b,
|
||||
0x22, 0xd7, 0x4a, 0xe4, 0x47, 0x99, 0x7c, 0x94, 0x59, 0x85, 0xfe, 0x96, 0x2f, 0x7e, 0x07, 0x00,
|
||||
0x00, 0xff, 0xff, 0xe1, 0xcc, 0x84, 0x25, 0x24, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// IdentityAgentClient is the client API for IdentityAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type IdentityAgentClient interface {
|
||||
Invoke(ctx context.Context, in *IdentityRequest, opts ...grpc.CallOption) (*IdentityResponse, error)
|
||||
}
|
||||
|
||||
type identityAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewIdentityAgentClient(cc *grpc.ClientConn) IdentityAgentClient {
|
||||
return &identityAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *identityAgentClient) Invoke(ctx context.Context, in *IdentityRequest, opts ...grpc.CallOption) (*IdentityResponse, error) {
|
||||
out := new(IdentityResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.security.IdentityAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// IdentityAgentServer is the server API for IdentityAgent service.
|
||||
type IdentityAgentServer interface {
|
||||
Invoke(context.Context, *IdentityRequest) (*IdentityResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedIdentityAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedIdentityAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedIdentityAgentServer) Invoke(ctx context.Context, req *IdentityRequest) (*IdentityResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterIdentityAgentServer(s *grpc.Server, srv IdentityAgentServer) {
|
||||
s.RegisterService(&_IdentityAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _IdentityAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(IdentityRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(IdentityAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.security.IdentityAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(IdentityAgentServer).Invoke(ctx, req.(*IdentityRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _IdentityAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.security.IdentityAgent",
|
||||
HandlerType: (*IdentityAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _IdentityAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "identity.proto",
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/security";
|
||||
package moc.cloudagent.security;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
message IdentityRequest {
|
||||
repeated Identity Identitys = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message IdentityResponse {
|
||||
repeated Identity Identitys = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message Identity {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
string resourceGroup = 3;
|
||||
string password = 4;
|
||||
string token = 5;
|
||||
bytes certificate = 6;
|
||||
Status status = 7;
|
||||
string locationName = 10;
|
||||
}
|
||||
|
||||
service IdentityAgent {
|
||||
rpc Invoke(IdentityRequest) returns (IdentityResponse) {}
|
||||
}
|
|
@ -0,0 +1,534 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: key.proto
|
||||
|
||||
package security
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type KeyRequest struct {
|
||||
Keys []*Key `protobuf:"bytes,1,rep,name=Keys,proto3" json:"Keys,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *KeyRequest) Reset() { *m = KeyRequest{} }
|
||||
func (m *KeyRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeyRequest) ProtoMessage() {}
|
||||
func (*KeyRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2accf5df6005b7d4, []int{0}
|
||||
}
|
||||
|
||||
func (m *KeyRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KeyRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *KeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_KeyRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *KeyRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_KeyRequest.Merge(m, src)
|
||||
}
|
||||
func (m *KeyRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_KeyRequest.Size(m)
|
||||
}
|
||||
func (m *KeyRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_KeyRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_KeyRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *KeyRequest) GetKeys() []*Key {
|
||||
if m != nil {
|
||||
return m.Keys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type KeyResponse struct {
|
||||
Keys []*Key `protobuf:"bytes,1,rep,name=Keys,proto3" json:"Keys,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *KeyResponse) Reset() { *m = KeyResponse{} }
|
||||
func (m *KeyResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeyResponse) ProtoMessage() {}
|
||||
func (*KeyResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2accf5df6005b7d4, []int{1}
|
||||
}
|
||||
|
||||
func (m *KeyResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KeyResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *KeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_KeyResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *KeyResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_KeyResponse.Merge(m, src)
|
||||
}
|
||||
func (m *KeyResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_KeyResponse.Size(m)
|
||||
}
|
||||
func (m *KeyResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_KeyResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_KeyResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *KeyResponse) GetKeys() []*Key {
|
||||
if m != nil {
|
||||
return m.Keys
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type KeyOperationRequest struct {
|
||||
Key *Key `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Data string `protobuf:"bytes,2,opt,name=Data,proto3" json:"Data,omitempty"`
|
||||
Algorithm common.Algorithm `protobuf:"varint,3,opt,name=algorithm,proto3,enum=moc.Algorithm" json:"algorithm,omitempty"`
|
||||
OperationType common.KeyOperation `protobuf:"varint,4,opt,name=OperationType,proto3,enum=moc.KeyOperation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *KeyOperationRequest) Reset() { *m = KeyOperationRequest{} }
|
||||
func (m *KeyOperationRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeyOperationRequest) ProtoMessage() {}
|
||||
func (*KeyOperationRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2accf5df6005b7d4, []int{2}
|
||||
}
|
||||
|
||||
func (m *KeyOperationRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KeyOperationRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *KeyOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_KeyOperationRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *KeyOperationRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_KeyOperationRequest.Merge(m, src)
|
||||
}
|
||||
func (m *KeyOperationRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_KeyOperationRequest.Size(m)
|
||||
}
|
||||
func (m *KeyOperationRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_KeyOperationRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_KeyOperationRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *KeyOperationRequest) GetKey() *Key {
|
||||
if m != nil {
|
||||
return m.Key
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyOperationRequest) GetData() string {
|
||||
if m != nil {
|
||||
return m.Data
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *KeyOperationRequest) GetAlgorithm() common.Algorithm {
|
||||
if m != nil {
|
||||
return m.Algorithm
|
||||
}
|
||||
return common.Algorithm_A_UNKNOWN
|
||||
}
|
||||
|
||||
func (m *KeyOperationRequest) GetOperationType() common.KeyOperation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.KeyOperation_ENCRYPT
|
||||
}
|
||||
|
||||
type KeyOperationResponse struct {
|
||||
Data string `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *KeyOperationResponse) Reset() { *m = KeyOperationResponse{} }
|
||||
func (m *KeyOperationResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeyOperationResponse) ProtoMessage() {}
|
||||
func (*KeyOperationResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2accf5df6005b7d4, []int{3}
|
||||
}
|
||||
|
||||
func (m *KeyOperationResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KeyOperationResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *KeyOperationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_KeyOperationResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *KeyOperationResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_KeyOperationResponse.Merge(m, src)
|
||||
}
|
||||
func (m *KeyOperationResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_KeyOperationResponse.Size(m)
|
||||
}
|
||||
func (m *KeyOperationResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_KeyOperationResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_KeyOperationResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *KeyOperationResponse) GetData() string {
|
||||
if m != nil {
|
||||
return m.Data
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *KeyOperationResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyOperationResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Key struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
LocationName string `protobuf:"bytes,3,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
// Public Key Value
|
||||
PublicKey []byte `protobuf:"bytes,4,opt,name=publicKey,proto3" json:"publicKey,omitempty"`
|
||||
Type common.JsonWebKeyType `protobuf:"varint,5,opt,name=type,proto3,enum=moc.JsonWebKeyType" json:"type,omitempty"`
|
||||
VaultName string `protobuf:"bytes,6,opt,name=vaultName,proto3" json:"vaultName,omitempty"`
|
||||
GroupName string `protobuf:"bytes,7,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Size common.KeySize `protobuf:"varint,9,opt,name=size,proto3,enum=moc.KeySize" json:"size,omitempty"`
|
||||
Curve common.JsonWebKeyCurveName `protobuf:"varint,10,opt,name=curve,proto3,enum=moc.JsonWebKeyCurveName" json:"curve,omitempty"`
|
||||
KeyOps []common.KeyOperation `protobuf:"varint,11,rep,packed,name=keyOps,proto3,enum=moc.KeyOperation" json:"keyOps,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Key) Reset() { *m = Key{} }
|
||||
func (m *Key) String() string { return proto.CompactTextString(m) }
|
||||
func (*Key) ProtoMessage() {}
|
||||
func (*Key) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_2accf5df6005b7d4, []int{4}
|
||||
}
|
||||
|
||||
func (m *Key) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Key.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Key.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Key) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Key.Merge(m, src)
|
||||
}
|
||||
func (m *Key) XXX_Size() int {
|
||||
return xxx_messageInfo_Key.Size(m)
|
||||
}
|
||||
func (m *Key) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Key.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Key proto.InternalMessageInfo
|
||||
|
||||
func (m *Key) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Key) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Key) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Key) GetPublicKey() []byte {
|
||||
if m != nil {
|
||||
return m.PublicKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Key) GetType() common.JsonWebKeyType {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return common.JsonWebKeyType_EC
|
||||
}
|
||||
|
||||
func (m *Key) GetVaultName() string {
|
||||
if m != nil {
|
||||
return m.VaultName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Key) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Key) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Key) GetSize() common.KeySize {
|
||||
if m != nil {
|
||||
return m.Size
|
||||
}
|
||||
return common.KeySize_K_UNKNOWN
|
||||
}
|
||||
|
||||
func (m *Key) GetCurve() common.JsonWebKeyCurveName {
|
||||
if m != nil {
|
||||
return m.Curve
|
||||
}
|
||||
return common.JsonWebKeyCurveName_P_256
|
||||
}
|
||||
|
||||
func (m *Key) GetKeyOps() []common.KeyOperation {
|
||||
if m != nil {
|
||||
return m.KeyOps
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*KeyRequest)(nil), "moc.cloudagent.security.KeyRequest")
|
||||
proto.RegisterType((*KeyResponse)(nil), "moc.cloudagent.security.KeyResponse")
|
||||
proto.RegisterType((*KeyOperationRequest)(nil), "moc.cloudagent.security.KeyOperationRequest")
|
||||
proto.RegisterType((*KeyOperationResponse)(nil), "moc.cloudagent.security.KeyOperationResponse")
|
||||
proto.RegisterType((*Key)(nil), "moc.cloudagent.security.Key")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("key.proto", fileDescriptor_2accf5df6005b7d4) }
|
||||
|
||||
var fileDescriptor_2accf5df6005b7d4 = []byte{
|
||||
// 580 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xdd, 0x6e, 0xd3, 0x4c,
|
||||
0x10, 0xfd, 0x9c, 0xa4, 0x69, 0x33, 0xc9, 0x17, 0x89, 0x6d, 0x25, 0xac, 0xa8, 0x42, 0x51, 0x8a,
|
||||
0x44, 0x91, 0x8a, 0x5d, 0x19, 0x24, 0xae, 0x5b, 0xe0, 0x02, 0x2c, 0x81, 0xb4, 0xe5, 0x47, 0xe2,
|
||||
0xce, 0x71, 0xa7, 0xae, 0x15, 0xdb, 0x6b, 0xf6, 0x27, 0xc8, 0x7d, 0x03, 0xde, 0x8a, 0x7b, 0xde,
|
||||
0x86, 0x27, 0x40, 0x3b, 0xb6, 0x1b, 0x12, 0x41, 0x84, 0x10, 0x77, 0xde, 0x99, 0x73, 0xe6, 0x9c,
|
||||
0x3d, 0x3b, 0x86, 0xc1, 0x02, 0x2b, 0xaf, 0x94, 0x42, 0x0b, 0x76, 0x37, 0x17, 0xb1, 0x17, 0x67,
|
||||
0xc2, 0x5c, 0x46, 0x09, 0x16, 0xda, 0x53, 0x18, 0x1b, 0x99, 0xea, 0x6a, 0x72, 0x2f, 0x11, 0x22,
|
||||
0xc9, 0xd0, 0x27, 0xd8, 0xdc, 0x5c, 0xf9, 0x9f, 0x65, 0x54, 0x96, 0x28, 0x55, 0x4d, 0x9c, 0x8c,
|
||||
0x62, 0x91, 0xe7, 0xa2, 0x68, 0x4e, 0xe3, 0x96, 0x57, 0x9f, 0x67, 0x1a, 0x20, 0xc4, 0x8a, 0xe3,
|
||||
0x27, 0x83, 0x4a, 0xb3, 0x53, 0xe8, 0x85, 0x58, 0x29, 0xd7, 0x99, 0x76, 0x8f, 0x87, 0xc1, 0xa1,
|
||||
0xf7, 0x1b, 0x4d, 0xcf, 0x52, 0x08, 0xc9, 0x9e, 0xc0, 0xff, 0x6f, 0x4a, 0x94, 0x91, 0x4e, 0x45,
|
||||
0xf1, 0xb6, 0x2a, 0xd1, 0xed, 0x4c, 0x9d, 0xe3, 0x71, 0x30, 0x26, 0xea, 0x6d, 0x87, 0xaf, 0x83,
|
||||
0x66, 0x5f, 0x1c, 0x18, 0x92, 0xac, 0x2a, 0x45, 0xa1, 0xf0, 0x2f, 0x74, 0x03, 0xe8, 0x73, 0x54,
|
||||
0x26, 0xd3, 0x24, 0x38, 0x0c, 0x26, 0x5e, 0x1d, 0x83, 0xd7, 0xc6, 0xe0, 0x9d, 0x0b, 0x91, 0xbd,
|
||||
0x8f, 0x32, 0x83, 0xbc, 0x41, 0xb2, 0x03, 0xd8, 0x79, 0x21, 0xa5, 0x90, 0x6e, 0x77, 0xea, 0x1c,
|
||||
0x0f, 0x78, 0x7d, 0x98, 0x7d, 0x75, 0x60, 0x3f, 0xc4, 0x6a, 0xe5, 0xb5, 0xc9, 0xc2, 0x83, 0xee,
|
||||
0x02, 0x2b, 0xd7, 0xa1, 0xf1, 0xdb, 0x2d, 0x59, 0x20, 0x63, 0xd0, 0x7b, 0x1e, 0xe9, 0x88, 0xfc,
|
||||
0x0c, 0x38, 0x7d, 0xb3, 0x13, 0x18, 0x44, 0x59, 0x22, 0x64, 0xaa, 0xaf, 0x73, 0x52, 0x6d, 0x93,
|
||||
0x39, 0x6b, 0xab, 0x7c, 0x05, 0x60, 0x4f, 0x37, 0xb3, 0xec, 0x11, 0xe3, 0x0e, 0x31, 0xd6, 0x2c,
|
||||
0x6e, 0xc4, 0xa9, 0xe1, 0x60, 0xfd, 0x06, 0x4d, 0xac, 0xad, 0x25, 0xe7, 0x27, 0x4b, 0xff, 0x2e,
|
||||
0xb8, 0xef, 0x1d, 0xe8, 0x86, 0xf5, 0xc5, 0x8b, 0x28, 0xc7, 0x56, 0xc5, 0x7e, 0xb3, 0x31, 0x74,
|
||||
0xd2, 0xcb, 0x26, 0x8a, 0x4e, 0x7a, 0xc9, 0x66, 0x30, 0xca, 0x44, 0x4c, 0xee, 0x5e, 0x5b, 0x6c,
|
||||
0x3d, 0x68, 0xad, 0xc6, 0x0e, 0x61, 0x50, 0x9a, 0x79, 0x96, 0xc6, 0x21, 0x56, 0x74, 0xf5, 0x11,
|
||||
0x5f, 0x15, 0xd8, 0x03, 0xe8, 0x69, 0x9b, 0xc9, 0x0e, 0x65, 0xb2, 0x4f, 0x99, 0xbc, 0x52, 0xa2,
|
||||
0xf8, 0x80, 0xf3, 0x10, 0x2b, 0x1b, 0x03, 0x27, 0x80, 0x1d, 0xb3, 0x8c, 0x4c, 0xa6, 0x49, 0xa7,
|
||||
0x4f, 0x3a, 0xab, 0x82, 0xed, 0x26, 0x52, 0x98, 0x92, 0xba, 0xbb, 0x75, 0xf7, 0xb6, 0xc0, 0x8e,
|
||||
0xa0, 0xaf, 0x74, 0xa4, 0x8d, 0x72, 0xf7, 0x28, 0x9c, 0x21, 0xc9, 0x5c, 0x50, 0x89, 0x37, 0x2d,
|
||||
0x36, 0x85, 0x9e, 0x4a, 0x6f, 0xd0, 0x1d, 0x90, 0x93, 0x51, 0xfb, 0x3a, 0x17, 0xe9, 0x0d, 0x72,
|
||||
0xea, 0x30, 0x0f, 0x76, 0x62, 0x23, 0x97, 0xe8, 0x02, 0x41, 0xdc, 0x0d, 0xb3, 0xcf, 0x6c, 0xcf,
|
||||
0xea, 0xf1, 0x1a, 0xc6, 0x1e, 0x42, 0x7f, 0x61, 0xdf, 0x4f, 0xb9, 0xc3, 0x69, 0xf7, 0xd7, 0x2f,
|
||||
0xde, 0x00, 0x82, 0x6f, 0x0e, 0xec, 0x85, 0x58, 0x9d, 0xd9, 0x25, 0x64, 0xef, 0xa0, 0xff, 0xb2,
|
||||
0x58, 0x8a, 0x05, 0xb2, 0xa3, 0xad, 0xfb, 0x59, 0x6f, 0xf4, 0xe4, 0xfe, 0x76, 0x50, 0xbd, 0x34,
|
||||
0xb3, 0xff, 0xd8, 0x35, 0xec, 0xd6, 0xc2, 0xc8, 0x4e, 0xb6, 0x51, 0x36, 0x7f, 0x99, 0xc9, 0xa3,
|
||||
0x3f, 0x44, 0xb7, 0x4a, 0xe7, 0xc1, 0xc7, 0xd3, 0x24, 0xd5, 0xd7, 0x66, 0xee, 0xc5, 0x22, 0xf7,
|
||||
0xf3, 0x34, 0x96, 0x42, 0x89, 0x2b, 0xed, 0xe7, 0x22, 0xf6, 0x65, 0x19, 0xfb, 0xab, 0x51, 0x7e,
|
||||
0x3b, 0x6a, 0xde, 0xa7, 0x45, 0x7d, 0xfc, 0x23, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x22, 0xc4, 0xeb,
|
||||
0x1c, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// KeyAgentClient is the client API for KeyAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type KeyAgentClient interface {
|
||||
Invoke(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (*KeyResponse, error)
|
||||
Operate(ctx context.Context, in *KeyOperationRequest, opts ...grpc.CallOption) (*KeyOperationResponse, error)
|
||||
}
|
||||
|
||||
type keyAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewKeyAgentClient(cc *grpc.ClientConn) KeyAgentClient {
|
||||
return &keyAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *keyAgentClient) Invoke(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (*KeyResponse, error) {
|
||||
out := new(KeyResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.security.KeyAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *keyAgentClient) Operate(ctx context.Context, in *KeyOperationRequest, opts ...grpc.CallOption) (*KeyOperationResponse, error) {
|
||||
out := new(KeyOperationResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.security.KeyAgent/Operate", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// KeyAgentServer is the server API for KeyAgent service.
|
||||
type KeyAgentServer interface {
|
||||
Invoke(context.Context, *KeyRequest) (*KeyResponse, error)
|
||||
Operate(context.Context, *KeyOperationRequest) (*KeyOperationResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedKeyAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedKeyAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedKeyAgentServer) Invoke(ctx context.Context, req *KeyRequest) (*KeyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
func (*UnimplementedKeyAgentServer) Operate(ctx context.Context, req *KeyOperationRequest) (*KeyOperationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Operate not implemented")
|
||||
}
|
||||
|
||||
func RegisterKeyAgentServer(s *grpc.Server, srv KeyAgentServer) {
|
||||
s.RegisterService(&_KeyAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _KeyAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(KeyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(KeyAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.security.KeyAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(KeyAgentServer).Invoke(ctx, req.(*KeyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _KeyAgent_Operate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(KeyOperationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(KeyAgentServer).Operate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.security.KeyAgent/Operate",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(KeyAgentServer).Operate(ctx, req.(*KeyOperationRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _KeyAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.security.KeyAgent",
|
||||
HandlerType: (*KeyAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _KeyAgent_Invoke_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Operate",
|
||||
Handler: _KeyAgent_Operate_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "key.proto",
|
||||
}
|
|
@ -0,0 +1,326 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: keyvault.proto
|
||||
|
||||
package security
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type KeyVaultRequest struct {
|
||||
KeyVaults []*KeyVault `protobuf:"bytes,1,rep,name=KeyVaults,proto3" json:"KeyVaults,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *KeyVaultRequest) Reset() { *m = KeyVaultRequest{} }
|
||||
func (m *KeyVaultRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeyVaultRequest) ProtoMessage() {}
|
||||
func (*KeyVaultRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4c3d44d2a4b8394c, []int{0}
|
||||
}
|
||||
|
||||
func (m *KeyVaultRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KeyVaultRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *KeyVaultRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_KeyVaultRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *KeyVaultRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_KeyVaultRequest.Merge(m, src)
|
||||
}
|
||||
func (m *KeyVaultRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_KeyVaultRequest.Size(m)
|
||||
}
|
||||
func (m *KeyVaultRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_KeyVaultRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_KeyVaultRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *KeyVaultRequest) GetKeyVaults() []*KeyVault {
|
||||
if m != nil {
|
||||
return m.KeyVaults
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyVaultRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type KeyVaultResponse struct {
|
||||
KeyVaults []*KeyVault `protobuf:"bytes,1,rep,name=KeyVaults,proto3" json:"KeyVaults,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *KeyVaultResponse) Reset() { *m = KeyVaultResponse{} }
|
||||
func (m *KeyVaultResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeyVaultResponse) ProtoMessage() {}
|
||||
func (*KeyVaultResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4c3d44d2a4b8394c, []int{1}
|
||||
}
|
||||
|
||||
func (m *KeyVaultResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KeyVaultResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *KeyVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_KeyVaultResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *KeyVaultResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_KeyVaultResponse.Merge(m, src)
|
||||
}
|
||||
func (m *KeyVaultResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_KeyVaultResponse.Size(m)
|
||||
}
|
||||
func (m *KeyVaultResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_KeyVaultResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_KeyVaultResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *KeyVaultResponse) GetKeyVaults() []*KeyVault {
|
||||
if m != nil {
|
||||
return m.KeyVaults
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyVaultResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyVaultResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type KeyVault struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Secrets []*Secret `protobuf:"bytes,3,rep,name=Secrets,proto3" json:"Secrets,omitempty"`
|
||||
GroupName string `protobuf:"bytes,4,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
|
||||
LocationName string `protobuf:"bytes,10,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *KeyVault) Reset() { *m = KeyVault{} }
|
||||
func (m *KeyVault) String() string { return proto.CompactTextString(m) }
|
||||
func (*KeyVault) ProtoMessage() {}
|
||||
func (*KeyVault) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4c3d44d2a4b8394c, []int{2}
|
||||
}
|
||||
|
||||
func (m *KeyVault) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KeyVault.Unmarshal(m, b)
|
||||
}
|
||||
func (m *KeyVault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_KeyVault.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *KeyVault) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_KeyVault.Merge(m, src)
|
||||
}
|
||||
func (m *KeyVault) XXX_Size() int {
|
||||
return xxx_messageInfo_KeyVault.Size(m)
|
||||
}
|
||||
func (m *KeyVault) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_KeyVault.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_KeyVault proto.InternalMessageInfo
|
||||
|
||||
func (m *KeyVault) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *KeyVault) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *KeyVault) GetSecrets() []*Secret {
|
||||
if m != nil {
|
||||
return m.Secrets
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyVault) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *KeyVault) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KeyVault) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*KeyVaultRequest)(nil), "moc.cloudagent.security.KeyVaultRequest")
|
||||
proto.RegisterType((*KeyVaultResponse)(nil), "moc.cloudagent.security.KeyVaultResponse")
|
||||
proto.RegisterType((*KeyVault)(nil), "moc.cloudagent.security.KeyVault")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("keyvault.proto", fileDescriptor_4c3d44d2a4b8394c) }
|
||||
|
||||
var fileDescriptor_4c3d44d2a4b8394c = []byte{
|
||||
// 411 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0xcf, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xc6, 0x71, 0xd2, 0x06, 0x32, 0x69, 0x03, 0x5a, 0x21, 0x61, 0x45, 0x08, 0x82, 0xb9, 0x98,
|
||||
0xcb, 0x1a, 0x19, 0x2e, 0x9c, 0x10, 0x95, 0x38, 0x20, 0x24, 0x90, 0xb6, 0xa8, 0x07, 0x2e, 0xc8,
|
||||
0xd9, 0x4c, 0x8d, 0x55, 0xdb, 0xb3, 0xec, 0x9f, 0x22, 0xbf, 0x01, 0x2f, 0xc1, 0x3b, 0xf1, 0x48,
|
||||
0x28, 0xe3, 0xb8, 0x56, 0x0f, 0x15, 0x48, 0xbd, 0x79, 0x67, 0xbf, 0xf9, 0xcd, 0xb7, 0xdf, 0x18,
|
||||
0x96, 0x17, 0xd8, 0x5d, 0x16, 0xa1, 0xf6, 0xd2, 0x58, 0xf2, 0x24, 0x1e, 0x35, 0xa4, 0xa5, 0xae,
|
||||
0x29, 0x6c, 0x8b, 0x12, 0x5b, 0x2f, 0x1d, 0xea, 0x60, 0x2b, 0xdf, 0xad, 0x9e, 0x94, 0x44, 0x65,
|
||||
0x8d, 0x19, 0xcb, 0x36, 0xe1, 0x3c, 0xfb, 0x69, 0x0b, 0x63, 0xd0, 0xba, 0xbe, 0x71, 0x75, 0xa4,
|
||||
0xa9, 0x69, 0xa8, 0x1d, 0x4e, 0x0e, 0xb5, 0xc5, 0x3d, 0x34, 0xf9, 0x15, 0xc1, 0xfd, 0x8f, 0xd8,
|
||||
0x9d, 0xed, 0xe6, 0x28, 0xfc, 0x11, 0xd0, 0x79, 0xf1, 0x16, 0xe6, 0x43, 0xc9, 0xc5, 0xd1, 0x7a,
|
||||
0x9a, 0x2e, 0xf2, 0x67, 0xf2, 0x86, 0xe1, 0xf2, 0xaa, 0x79, 0xec, 0x11, 0xaf, 0xe1, 0xf8, 0xb3,
|
||||
0x41, 0x5b, 0xf8, 0x8a, 0xda, 0x2f, 0x9d, 0xc1, 0x78, 0xb2, 0x8e, 0xd2, 0x65, 0xbe, 0x64, 0xc8,
|
||||
0xd5, 0x8d, 0xba, 0x2e, 0x4a, 0x7e, 0x47, 0xf0, 0x60, 0xb4, 0xe2, 0x0c, 0xb5, 0x0e, 0x6f, 0xef,
|
||||
0x25, 0x87, 0x99, 0x42, 0x17, 0x6a, 0xcf, 0x26, 0x16, 0xf9, 0x4a, 0xf6, 0x69, 0xc9, 0x21, 0x2d,
|
||||
0x79, 0x42, 0x54, 0x9f, 0x15, 0x75, 0x40, 0xb5, 0x57, 0x8a, 0x87, 0x70, 0xf8, 0xde, 0x5a, 0xb2,
|
||||
0xf1, 0x74, 0x1d, 0xa5, 0x73, 0xd5, 0x1f, 0x92, 0x3f, 0x11, 0xdc, 0x1b, 0xb8, 0x42, 0xc0, 0x41,
|
||||
0x5b, 0x34, 0x18, 0x47, 0xac, 0xe0, 0x6f, 0xb1, 0x84, 0x49, 0xb5, 0xe5, 0x31, 0x73, 0x35, 0xa9,
|
||||
0xb6, 0xe2, 0x0d, 0xdc, 0x3d, 0xe5, 0xac, 0x5d, 0x3c, 0x65, 0xe7, 0x4f, 0x6f, 0x74, 0xde, 0xeb,
|
||||
0xd4, 0xa0, 0x17, 0x8f, 0x61, 0x5e, 0x5a, 0x0a, 0xe6, 0xd3, 0x6e, 0xc6, 0x01, 0x13, 0xc7, 0x82,
|
||||
0x78, 0x0e, 0x33, 0xe7, 0x0b, 0x1f, 0x5c, 0x7c, 0xc8, 0x6f, 0x5a, 0x30, 0xf7, 0x94, 0x4b, 0x6a,
|
||||
0x7f, 0x25, 0x12, 0x38, 0xaa, 0x49, 0x73, 0xbc, 0x4c, 0x01, 0xa6, 0x5c, 0xab, 0xe5, 0x06, 0x8e,
|
||||
0x87, 0x17, 0xbd, 0xdb, 0x19, 0x12, 0xdf, 0x60, 0xf6, 0xa1, 0xbd, 0xa4, 0x0b, 0x14, 0xe9, 0xbf,
|
||||
0x53, 0xee, 0x7f, 0x97, 0xd5, 0x8b, 0xff, 0x50, 0xf6, 0xdb, 0x4c, 0xee, 0x9c, 0xe4, 0x5f, 0x5f,
|
||||
0x96, 0x95, 0xff, 0x1e, 0x36, 0x52, 0x53, 0x93, 0x35, 0x95, 0xb6, 0xe4, 0xe8, 0xdc, 0x67, 0x0d,
|
||||
0xe9, 0xcc, 0x1a, 0x9d, 0x8d, 0x98, 0x6c, 0xc0, 0x6c, 0x66, 0xbc, 0xaa, 0x57, 0x7f, 0x03, 0x00,
|
||||
0x00, 0xff, 0xff, 0x2b, 0x2e, 0xad, 0x5d, 0x11, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// KeyVaultAgentClient is the client API for KeyVaultAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type KeyVaultAgentClient interface {
|
||||
Invoke(ctx context.Context, in *KeyVaultRequest, opts ...grpc.CallOption) (*KeyVaultResponse, error)
|
||||
}
|
||||
|
||||
type keyVaultAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewKeyVaultAgentClient(cc *grpc.ClientConn) KeyVaultAgentClient {
|
||||
return &keyVaultAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *keyVaultAgentClient) Invoke(ctx context.Context, in *KeyVaultRequest, opts ...grpc.CallOption) (*KeyVaultResponse, error) {
|
||||
out := new(KeyVaultResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.security.KeyVaultAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// KeyVaultAgentServer is the server API for KeyVaultAgent service.
|
||||
type KeyVaultAgentServer interface {
|
||||
Invoke(context.Context, *KeyVaultRequest) (*KeyVaultResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedKeyVaultAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedKeyVaultAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedKeyVaultAgentServer) Invoke(ctx context.Context, req *KeyVaultRequest) (*KeyVaultResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterKeyVaultAgentServer(s *grpc.Server, srv KeyVaultAgentServer) {
|
||||
s.RegisterService(&_KeyVaultAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _KeyVaultAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(KeyVaultRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(KeyVaultAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.security.KeyVaultAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(KeyVaultAgentServer).Invoke(ctx, req.(*KeyVaultRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _KeyVaultAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.security.KeyVaultAgent",
|
||||
HandlerType: (*KeyVaultAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _KeyVaultAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "keyvault.proto",
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/security";
|
||||
package moc.cloudagent.security;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
import "security.proto";
|
||||
|
||||
|
||||
message KeyRequest {
|
||||
repeated Key Keys = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message KeyResponse {
|
||||
repeated Key Keys = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message KeyOperationRequest {
|
||||
Key key = 1;
|
||||
string Data = 2;
|
||||
Algorithm algorithm = 3;
|
||||
KeyOperation OperationType = 4;
|
||||
}
|
||||
|
||||
message KeyOperationResponse {
|
||||
string Data = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message Key {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
string locationName = 3;
|
||||
// Public Key Value
|
||||
bytes publicKey = 4;
|
||||
JsonWebKeyType type = 5;
|
||||
string vaultName = 6;
|
||||
string groupName = 7;
|
||||
Status status = 8;
|
||||
KeySize size = 9;
|
||||
JsonWebKeyCurveName curve = 10;
|
||||
repeated KeyOperation keyOps = 11;
|
||||
}
|
||||
|
||||
service KeyAgent {
|
||||
rpc Invoke(KeyRequest) returns (KeyResponse) {}
|
||||
rpc Operate(KeyOperationRequest) returns (KeyOperationResponse) {}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/security";
|
||||
package moc.cloudagent.security;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
import "secret.proto";
|
||||
|
||||
message KeyVaultRequest {
|
||||
repeated KeyVault KeyVaults = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message KeyVaultResponse {
|
||||
repeated KeyVault KeyVaults = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message KeyVault {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
repeated Secret Secrets = 3;
|
||||
string groupName = 4;
|
||||
Status status = 5;
|
||||
string locationName = 10;
|
||||
}
|
||||
|
||||
service KeyVaultAgent {
|
||||
rpc Invoke(KeyVaultRequest) returns (KeyVaultResponse) {}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/security";
|
||||
package moc.cloudagent.security;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
message SecretRequest {
|
||||
repeated Secret Secrets = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message SecretResponse {
|
||||
repeated Secret Secrets = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message Secret {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
string filename = 3;
|
||||
bytes value = 4;
|
||||
string vaultId = 5;
|
||||
string vaultName = 6;
|
||||
string groupName = 7;
|
||||
Status status = 8;
|
||||
string locationName = 10;
|
||||
}
|
||||
|
||||
service SecretAgent {
|
||||
rpc Invoke(SecretRequest) returns (SecretResponse) {}
|
||||
}
|
|
@ -0,0 +1,351 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: secret.proto
|
||||
|
||||
package security
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type SecretRequest struct {
|
||||
Secrets []*Secret `protobuf:"bytes,1,rep,name=Secrets,proto3" json:"Secrets,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SecretRequest) Reset() { *m = SecretRequest{} }
|
||||
func (m *SecretRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SecretRequest) ProtoMessage() {}
|
||||
func (*SecretRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_6acf428160d7a216, []int{0}
|
||||
}
|
||||
|
||||
func (m *SecretRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SecretRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SecretRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SecretRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SecretRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SecretRequest.Merge(m, src)
|
||||
}
|
||||
func (m *SecretRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_SecretRequest.Size(m)
|
||||
}
|
||||
func (m *SecretRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SecretRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SecretRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *SecretRequest) GetSecrets() []*Secret {
|
||||
if m != nil {
|
||||
return m.Secrets
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SecretRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type SecretResponse struct {
|
||||
Secrets []*Secret `protobuf:"bytes,1,rep,name=Secrets,proto3" json:"Secrets,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SecretResponse) Reset() { *m = SecretResponse{} }
|
||||
func (m *SecretResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SecretResponse) ProtoMessage() {}
|
||||
func (*SecretResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_6acf428160d7a216, []int{1}
|
||||
}
|
||||
|
||||
func (m *SecretResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SecretResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *SecretResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_SecretResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *SecretResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SecretResponse.Merge(m, src)
|
||||
}
|
||||
func (m *SecretResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_SecretResponse.Size(m)
|
||||
}
|
||||
func (m *SecretResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_SecretResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_SecretResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *SecretResponse) GetSecrets() []*Secret {
|
||||
if m != nil {
|
||||
return m.Secrets
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SecretResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SecretResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Secret struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"`
|
||||
Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
|
||||
VaultId string `protobuf:"bytes,5,opt,name=vaultId,proto3" json:"vaultId,omitempty"`
|
||||
VaultName string `protobuf:"bytes,6,opt,name=vaultName,proto3" json:"vaultName,omitempty"`
|
||||
GroupName string `protobuf:"bytes,7,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"`
|
||||
LocationName string `protobuf:"bytes,10,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Secret) Reset() { *m = Secret{} }
|
||||
func (m *Secret) String() string { return proto.CompactTextString(m) }
|
||||
func (*Secret) ProtoMessage() {}
|
||||
func (*Secret) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_6acf428160d7a216, []int{2}
|
||||
}
|
||||
|
||||
func (m *Secret) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Secret.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Secret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Secret.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Secret) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Secret.Merge(m, src)
|
||||
}
|
||||
func (m *Secret) XXX_Size() int {
|
||||
return xxx_messageInfo_Secret.Size(m)
|
||||
}
|
||||
func (m *Secret) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Secret.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Secret proto.InternalMessageInfo
|
||||
|
||||
func (m *Secret) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Secret) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Secret) GetFilename() string {
|
||||
if m != nil {
|
||||
return m.Filename
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Secret) GetValue() []byte {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Secret) GetVaultId() string {
|
||||
if m != nil {
|
||||
return m.VaultId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Secret) GetVaultName() string {
|
||||
if m != nil {
|
||||
return m.VaultName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Secret) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Secret) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Secret) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*SecretRequest)(nil), "moc.cloudagent.security.SecretRequest")
|
||||
proto.RegisterType((*SecretResponse)(nil), "moc.cloudagent.security.SecretResponse")
|
||||
proto.RegisterType((*Secret)(nil), "moc.cloudagent.security.Secret")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("secret.proto", fileDescriptor_6acf428160d7a216) }
|
||||
|
||||
var fileDescriptor_6acf428160d7a216 = []byte{
|
||||
// 422 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0x3d, 0x8f, 0xd3, 0x40,
|
||||
0x10, 0xc5, 0xb9, 0x3b, 0xe7, 0x32, 0xc9, 0xa5, 0x58, 0x21, 0x61, 0x59, 0x08, 0x22, 0x23, 0x41,
|
||||
0xaa, 0x35, 0x32, 0x34, 0x94, 0x9c, 0x44, 0x71, 0x0d, 0x48, 0x3e, 0x44, 0x01, 0x95, 0xb3, 0x99,
|
||||
0x18, 0x83, 0xed, 0x59, 0xf6, 0x23, 0xe8, 0x3a, 0xfe, 0x04, 0x3f, 0x17, 0x09, 0x79, 0x36, 0xce,
|
||||
0xe9, 0x0a, 0x74, 0x05, 0xdd, 0xce, 0x7b, 0x6f, 0xdf, 0x5b, 0xbf, 0x31, 0x2c, 0x2c, 0x2a, 0x83,
|
||||
0x4e, 0x6a, 0x43, 0x8e, 0xc4, 0xa3, 0x8e, 0x94, 0x54, 0x2d, 0xf9, 0x6d, 0x55, 0x63, 0xef, 0xa4,
|
||||
0x45, 0xe5, 0x4d, 0xe3, 0x6e, 0xd2, 0x27, 0x35, 0x51, 0xdd, 0x62, 0xce, 0xb2, 0x8d, 0xdf, 0xe5,
|
||||
0x3f, 0x4d, 0xa5, 0x35, 0x1a, 0x1b, 0x2e, 0xa6, 0x0b, 0x45, 0x5d, 0x47, 0x7d, 0x98, 0xb2, 0x5f,
|
||||
0x11, 0x5c, 0x5c, 0xb3, 0x6f, 0x89, 0x3f, 0x3c, 0x5a, 0x27, 0xde, 0xc0, 0x34, 0x00, 0x36, 0x89,
|
||||
0x56, 0x27, 0xeb, 0x79, 0xf1, 0x54, 0xfe, 0x23, 0x4a, 0x1e, 0x2e, 0x8e, 0x7a, 0xf1, 0x1a, 0x2e,
|
||||
0x3e, 0x68, 0x34, 0x95, 0x6b, 0xa8, 0xff, 0x78, 0xa3, 0x31, 0x99, 0xac, 0xa2, 0xf5, 0xb2, 0x58,
|
||||
0xb2, 0xc1, 0x91, 0x29, 0xef, 0x8a, 0xb2, 0xdf, 0x11, 0x2c, 0xc7, 0x27, 0x58, 0x4d, 0xbd, 0xc5,
|
||||
0xff, 0x79, 0x43, 0x01, 0x71, 0x89, 0xd6, 0xb7, 0x8e, 0xc3, 0xe7, 0x45, 0x2a, 0x43, 0x1f, 0x72,
|
||||
0xec, 0x43, 0x5e, 0x12, 0xb5, 0x9f, 0xaa, 0xd6, 0x63, 0x79, 0x50, 0x8a, 0x87, 0x70, 0xf6, 0xce,
|
||||
0x18, 0x32, 0xc9, 0xc9, 0x2a, 0x5a, 0xcf, 0xca, 0x30, 0x64, 0x7f, 0x22, 0x88, 0x83, 0xab, 0x10,
|
||||
0x70, 0xda, 0x57, 0x1d, 0x26, 0x11, 0xf3, 0x7c, 0x16, 0x4b, 0x98, 0x34, 0x5b, 0x0e, 0x99, 0x95,
|
||||
0x93, 0x66, 0x2b, 0x52, 0x38, 0xdf, 0x35, 0x2d, 0xb2, 0x2e, 0xf8, 0x1c, 0xe7, 0x21, 0x60, 0x3f,
|
||||
0x24, 0x26, 0xa7, 0xab, 0x68, 0xbd, 0x28, 0xc3, 0x20, 0x12, 0x98, 0xee, 0x2b, 0xdf, 0xba, 0xab,
|
||||
0x6d, 0x72, 0xc6, 0x17, 0xc6, 0x51, 0x3c, 0x86, 0x19, 0x1f, 0xdf, 0x0f, 0x66, 0x31, 0x73, 0xb7,
|
||||
0xc0, 0xc0, 0xd6, 0x86, 0xbc, 0x66, 0x76, 0x1a, 0xd8, 0x23, 0x20, 0x9e, 0x41, 0x6c, 0x5d, 0xe5,
|
||||
0xbc, 0x4d, 0xce, 0xb9, 0x80, 0x39, 0x57, 0x77, 0xcd, 0x50, 0x79, 0xa0, 0x44, 0x06, 0x8b, 0x96,
|
||||
0x14, 0xef, 0x80, 0x5d, 0x80, 0x5d, 0xee, 0x60, 0xc5, 0x37, 0x98, 0x87, 0xcf, 0x7f, 0x3b, 0x34,
|
||||
0x2e, 0xbe, 0x40, 0x7c, 0xd5, 0xef, 0xe9, 0x3b, 0x8a, 0xe7, 0xf7, 0x2d, 0x23, 0xfc, 0x49, 0xe9,
|
||||
0x8b, 0x7b, 0x75, 0x61, 0xdd, 0xd9, 0x83, 0xcb, 0xe2, 0xf3, 0xcb, 0xba, 0x71, 0x5f, 0xfd, 0x46,
|
||||
0x2a, 0xea, 0xf2, 0xae, 0x51, 0x86, 0x2c, 0xed, 0x5c, 0xde, 0x91, 0xca, 0x8d, 0x56, 0xf9, 0xad,
|
||||
0x49, 0x3e, 0x9a, 0x6c, 0x62, 0xde, 0xe8, 0xab, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x35, 0xc2,
|
||||
0x0a, 0x31, 0x18, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// SecretAgentClient is the client API for SecretAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type SecretAgentClient interface {
|
||||
Invoke(ctx context.Context, in *SecretRequest, opts ...grpc.CallOption) (*SecretResponse, error)
|
||||
}
|
||||
|
||||
type secretAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewSecretAgentClient(cc *grpc.ClientConn) SecretAgentClient {
|
||||
return &secretAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *secretAgentClient) Invoke(ctx context.Context, in *SecretRequest, opts ...grpc.CallOption) (*SecretResponse, error) {
|
||||
out := new(SecretResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.security.SecretAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// SecretAgentServer is the server API for SecretAgent service.
|
||||
type SecretAgentServer interface {
|
||||
Invoke(context.Context, *SecretRequest) (*SecretResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedSecretAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedSecretAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedSecretAgentServer) Invoke(ctx context.Context, req *SecretRequest) (*SecretResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterSecretAgentServer(s *grpc.Server, srv SecretAgentServer) {
|
||||
s.RegisterService(&_SecretAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _SecretAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SecretRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SecretAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.security.SecretAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SecretAgentServer).Invoke(ctx, req.(*SecretRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _SecretAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.security.SecretAgent",
|
||||
HandlerType: (*SecretAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _SecretAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "secret.proto",
|
||||
}
|
|
@ -0,0 +1,354 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: container.proto
|
||||
|
||||
package storage
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type ContainerType int32
|
||||
|
||||
const (
|
||||
ContainerType_UNKNOWN ContainerType = 0
|
||||
ContainerType_SAN ContainerType = 1
|
||||
ContainerType_CSV ContainerType = 2
|
||||
ContainerType_SMB ContainerType = 3
|
||||
ContainerType_DAS ContainerType = 4
|
||||
)
|
||||
|
||||
var ContainerType_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "SAN",
|
||||
2: "CSV",
|
||||
3: "SMB",
|
||||
4: "DAS",
|
||||
}
|
||||
|
||||
var ContainerType_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"SAN": 1,
|
||||
"CSV": 2,
|
||||
"SMB": 3,
|
||||
"DAS": 4,
|
||||
}
|
||||
|
||||
func (x ContainerType) String() string {
|
||||
return proto.EnumName(ContainerType_name, int32(x))
|
||||
}
|
||||
|
||||
func (ContainerType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7afe31759757e49a, []int{0}
|
||||
}
|
||||
|
||||
type ContainerRequest struct {
|
||||
Containers []*Container `protobuf:"bytes,1,rep,name=Containers,proto3" json:"Containers,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ContainerRequest) Reset() { *m = ContainerRequest{} }
|
||||
func (m *ContainerRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ContainerRequest) ProtoMessage() {}
|
||||
func (*ContainerRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7afe31759757e49a, []int{0}
|
||||
}
|
||||
|
||||
func (m *ContainerRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ContainerRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ContainerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ContainerRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ContainerRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ContainerRequest.Merge(m, src)
|
||||
}
|
||||
func (m *ContainerRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_ContainerRequest.Size(m)
|
||||
}
|
||||
func (m *ContainerRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ContainerRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ContainerRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *ContainerRequest) GetContainers() []*Container {
|
||||
if m != nil {
|
||||
return m.Containers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ContainerRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type ContainerResponse struct {
|
||||
Containers []*Container `protobuf:"bytes,1,rep,name=Containers,proto3" json:"Containers,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ContainerResponse) Reset() { *m = ContainerResponse{} }
|
||||
func (m *ContainerResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ContainerResponse) ProtoMessage() {}
|
||||
func (*ContainerResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7afe31759757e49a, []int{1}
|
||||
}
|
||||
|
||||
func (m *ContainerResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ContainerResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ContainerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ContainerResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ContainerResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ContainerResponse.Merge(m, src)
|
||||
}
|
||||
func (m *ContainerResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_ContainerResponse.Size(m)
|
||||
}
|
||||
func (m *ContainerResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ContainerResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ContainerResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *ContainerResponse) GetContainers() []*Container {
|
||||
if m != nil {
|
||||
return m.Containers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ContainerResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ContainerResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Container struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
|
||||
LocationName string `protobuf:"bytes,6,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Container) Reset() { *m = Container{} }
|
||||
func (m *Container) String() string { return proto.CompactTextString(m) }
|
||||
func (*Container) ProtoMessage() {}
|
||||
func (*Container) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_7afe31759757e49a, []int{2}
|
||||
}
|
||||
|
||||
func (m *Container) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Container.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Container) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Container.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Container) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Container.Merge(m, src)
|
||||
}
|
||||
func (m *Container) XXX_Size() int {
|
||||
return xxx_messageInfo_Container.Size(m)
|
||||
}
|
||||
func (m *Container) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Container.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Container proto.InternalMessageInfo
|
||||
|
||||
func (m *Container) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Container) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Container) GetPath() string {
|
||||
if m != nil {
|
||||
return m.Path
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Container) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Container) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.cloudagent.storage.ContainerType", ContainerType_name, ContainerType_value)
|
||||
proto.RegisterType((*ContainerRequest)(nil), "moc.cloudagent.storage.ContainerRequest")
|
||||
proto.RegisterType((*ContainerResponse)(nil), "moc.cloudagent.storage.ContainerResponse")
|
||||
proto.RegisterType((*Container)(nil), "moc.cloudagent.storage.Container")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("container.proto", fileDescriptor_7afe31759757e49a) }
|
||||
|
||||
var fileDescriptor_7afe31759757e49a = []byte{
|
||||
// 425 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xd1, 0x6e, 0xd3, 0x30,
|
||||
0x14, 0x5d, 0xda, 0x2e, 0x53, 0x6f, 0xb7, 0x12, 0x2c, 0x84, 0xa2, 0x3e, 0xa0, 0x12, 0x5e, 0x0a,
|
||||
0x0f, 0xb6, 0x08, 0x7c, 0x00, 0xed, 0xe0, 0x01, 0x21, 0x32, 0x29, 0x85, 0x21, 0xf1, 0x82, 0x5c,
|
||||
0xd7, 0xcb, 0x22, 0x12, 0x5f, 0xcf, 0x76, 0x40, 0x7c, 0x03, 0x7c, 0x04, 0x9f, 0x8a, 0xe2, 0x74,
|
||||
0xd9, 0x2a, 0x21, 0xc1, 0xc3, 0xde, 0x8e, 0x8f, 0xcf, 0x3d, 0xf7, 0xe4, 0x38, 0x70, 0x4f, 0xa0,
|
||||
0x72, 0xbc, 0x54, 0xd2, 0x50, 0x6d, 0xd0, 0x21, 0x79, 0x58, 0xa3, 0xa0, 0xa2, 0xc2, 0x66, 0xcb,
|
||||
0x0b, 0xa9, 0x1c, 0xb5, 0x0e, 0x0d, 0x2f, 0xe4, 0xec, 0x51, 0x81, 0x58, 0x54, 0x92, 0x79, 0xd5,
|
||||
0xa6, 0xb9, 0x60, 0xdf, 0x0d, 0xd7, 0x5a, 0x1a, 0xdb, 0xcd, 0xcd, 0x8e, 0x05, 0xd6, 0x35, 0xaa,
|
||||
0xee, 0x94, 0xfc, 0x0c, 0x20, 0x3a, 0xbd, 0x76, 0xce, 0xe5, 0x55, 0x23, 0xad, 0x23, 0x4b, 0x80,
|
||||
0x9e, 0xb3, 0x71, 0x30, 0x1f, 0x2e, 0x26, 0xe9, 0x63, 0xfa, 0xf7, 0x7d, 0xf4, 0x66, 0xfa, 0xd6,
|
||||
0x10, 0x79, 0x09, 0x27, 0x67, 0x5a, 0x1a, 0xee, 0x4a, 0x54, 0x1f, 0x7e, 0x68, 0x19, 0x0f, 0xe6,
|
||||
0xc1, 0x62, 0x9a, 0x4e, 0xbd, 0x4b, 0x7f, 0x93, 0xef, 0x8b, 0x92, 0xdf, 0x01, 0xdc, 0xbf, 0x95,
|
||||
0xc6, 0x6a, 0x54, 0x56, 0xde, 0x45, 0x9c, 0x14, 0xc2, 0x5c, 0xda, 0xa6, 0x72, 0x3e, 0xc7, 0x24,
|
||||
0x9d, 0xd1, 0xae, 0x25, 0x7a, 0xdd, 0x12, 0x5d, 0x21, 0x56, 0xe7, 0xbc, 0x6a, 0x64, 0xbe, 0x53,
|
||||
0x92, 0x07, 0x70, 0xf8, 0xc6, 0x18, 0x34, 0xf1, 0x70, 0x1e, 0x2c, 0xc6, 0x79, 0x77, 0x48, 0x7e,
|
||||
0x05, 0x30, 0xee, 0x8d, 0x09, 0x81, 0x91, 0xe2, 0xb5, 0x8c, 0x03, 0x2f, 0xf1, 0x98, 0x4c, 0x61,
|
||||
0x50, 0x6e, 0xfd, 0x9e, 0x71, 0x3e, 0x28, 0xb7, 0xad, 0x46, 0x73, 0x77, 0x19, 0x8f, 0x3a, 0x4d,
|
||||
0x8b, 0xc9, 0x13, 0x08, 0xad, 0xe3, 0xae, 0xb1, 0xf1, 0xa1, 0xcf, 0x33, 0xf1, 0x9f, 0xb3, 0xf6,
|
||||
0x54, 0xbe, 0xbb, 0x22, 0x09, 0x1c, 0x57, 0x28, 0x7c, 0x3b, 0x59, 0xbb, 0x24, 0xf4, 0x06, 0x7b,
|
||||
0xdc, 0xb3, 0x57, 0x70, 0xd2, 0xa7, 0x69, 0x2b, 0x24, 0x13, 0x38, 0xfa, 0x98, 0xbd, 0xcb, 0xce,
|
||||
0x3e, 0x65, 0xd1, 0x01, 0x39, 0x82, 0xe1, 0x7a, 0x99, 0x45, 0x41, 0x0b, 0x4e, 0xd7, 0xe7, 0xd1,
|
||||
0xc0, 0x33, 0xef, 0x57, 0xd1, 0xb0, 0x05, 0xaf, 0x97, 0xeb, 0x68, 0x94, 0x5e, 0xc1, 0xb4, 0x77,
|
||||
0x58, 0xb6, 0x55, 0x92, 0x2f, 0x10, 0xbe, 0x55, 0xdf, 0xf0, 0xab, 0x24, 0x8b, 0x7f, 0xb7, 0xdc,
|
||||
0xfd, 0x32, 0xb3, 0xa7, 0xff, 0xa1, 0xec, 0x9e, 0x33, 0x39, 0x58, 0x3d, 0xff, 0xcc, 0x8a, 0xd2,
|
||||
0x5d, 0x36, 0x1b, 0x2a, 0xb0, 0x66, 0x75, 0x29, 0x0c, 0x5a, 0xbc, 0x70, 0xac, 0x46, 0xc1, 0x8c,
|
||||
0x16, 0xec, 0xc6, 0x86, 0xed, 0x6c, 0x36, 0xa1, 0x7f, 0xa8, 0x17, 0x7f, 0x02, 0x00, 0x00, 0xff,
|
||||
0xff, 0x4c, 0x9b, 0x46, 0x5f, 0x07, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// ContainerAgentClient is the client API for ContainerAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type ContainerAgentClient interface {
|
||||
Invoke(ctx context.Context, in *ContainerRequest, opts ...grpc.CallOption) (*ContainerResponse, error)
|
||||
}
|
||||
|
||||
type containerAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewContainerAgentClient(cc *grpc.ClientConn) ContainerAgentClient {
|
||||
return &containerAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *containerAgentClient) Invoke(ctx context.Context, in *ContainerRequest, opts ...grpc.CallOption) (*ContainerResponse, error) {
|
||||
out := new(ContainerResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.storage.ContainerAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ContainerAgentServer is the server API for ContainerAgent service.
|
||||
type ContainerAgentServer interface {
|
||||
Invoke(context.Context, *ContainerRequest) (*ContainerResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedContainerAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedContainerAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedContainerAgentServer) Invoke(ctx context.Context, req *ContainerRequest) (*ContainerResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterContainerAgentServer(s *grpc.Server, srv ContainerAgentServer) {
|
||||
s.RegisterService(&_ContainerAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _ContainerAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ContainerRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ContainerAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.storage.ContainerAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ContainerAgentServer).Invoke(ctx, req.(*ContainerRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _ContainerAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.storage.ContainerAgent",
|
||||
HandlerType: (*ContainerAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _ContainerAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "container.proto",
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/storage";
|
||||
package moc.cloudagent.storage;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
enum ContainerType {
|
||||
UNKNOWN = 0;
|
||||
SAN = 1;
|
||||
CSV = 2;
|
||||
SMB = 3;
|
||||
DAS = 4;
|
||||
}
|
||||
|
||||
message ContainerRequest {
|
||||
repeated Container Containers = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message ContainerResponse {
|
||||
repeated Container Containers = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message Container {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
string path = 4;
|
||||
Status status = 5;
|
||||
string locationName = 6;
|
||||
}
|
||||
|
||||
service ContainerAgent {
|
||||
rpc Invoke(ContainerRequest) returns (ContainerResponse) {}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,442 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: virtualharddisk.proto
|
||||
|
||||
package storage
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type VirtualHardDiskRequest struct {
|
||||
VirtualHardDisks []*VirtualHardDisk `protobuf:"bytes,1,rep,name=VirtualHardDisks,proto3" json:"VirtualHardDisks,omitempty"`
|
||||
OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualHardDiskRequest) Reset() { *m = VirtualHardDiskRequest{} }
|
||||
func (m *VirtualHardDiskRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualHardDiskRequest) ProtoMessage() {}
|
||||
func (*VirtualHardDiskRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f4b382f86170a6e5, []int{0}
|
||||
}
|
||||
|
||||
func (m *VirtualHardDiskRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualHardDiskRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualHardDiskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualHardDiskRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualHardDiskRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualHardDiskRequest.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualHardDiskRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualHardDiskRequest.Size(m)
|
||||
}
|
||||
func (m *VirtualHardDiskRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualHardDiskRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualHardDiskRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualHardDiskRequest) GetVirtualHardDisks() []*VirtualHardDisk {
|
||||
if m != nil {
|
||||
return m.VirtualHardDisks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualHardDiskRequest) GetOperationType() common.Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return common.Operation_GET
|
||||
}
|
||||
|
||||
type VirtualHardDiskResponse struct {
|
||||
VirtualHardDisks []*VirtualHardDisk `protobuf:"bytes,1,rep,name=VirtualHardDisks,proto3" json:"VirtualHardDisks,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualHardDiskResponse) Reset() { *m = VirtualHardDiskResponse{} }
|
||||
func (m *VirtualHardDiskResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualHardDiskResponse) ProtoMessage() {}
|
||||
func (*VirtualHardDiskResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f4b382f86170a6e5, []int{1}
|
||||
}
|
||||
|
||||
func (m *VirtualHardDiskResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualHardDiskResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualHardDiskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualHardDiskResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualHardDiskResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualHardDiskResponse.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualHardDiskResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualHardDiskResponse.Size(m)
|
||||
}
|
||||
func (m *VirtualHardDiskResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualHardDiskResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualHardDiskResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualHardDiskResponse) GetVirtualHardDisks() []*VirtualHardDisk {
|
||||
if m != nil {
|
||||
return m.VirtualHardDisks
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualHardDiskResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualHardDiskResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type VirtualHardDisk struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
ContainerName string `protobuf:"bytes,3,opt,name=containerName,proto3" json:"containerName,omitempty"`
|
||||
Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
|
||||
Status *common.Status `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"`
|
||||
Dynamic bool `protobuf:"varint,7,opt,name=dynamic,proto3" json:"dynamic,omitempty"`
|
||||
Blocksizebytes int32 `protobuf:"varint,8,opt,name=blocksizebytes,proto3" json:"blocksizebytes,omitempty"`
|
||||
Logicalsectorbytes int32 `protobuf:"varint,9,opt,name=logicalsectorbytes,proto3" json:"logicalsectorbytes,omitempty"`
|
||||
Physicalsectorbytes int32 `protobuf:"varint,10,opt,name=physicalsectorbytes,proto3" json:"physicalsectorbytes,omitempty"`
|
||||
Controllernumber int64 `protobuf:"varint,11,opt,name=controllernumber,proto3" json:"controllernumber,omitempty"`
|
||||
Controllerlocation int64 `protobuf:"varint,12,opt,name=controllerlocation,proto3" json:"controllerlocation,omitempty"`
|
||||
Disknumber int64 `protobuf:"varint,13,opt,name=disknumber,proto3" json:"disknumber,omitempty"`
|
||||
VirtualmachineName string `protobuf:"bytes,14,opt,name=virtualmachineName,proto3" json:"virtualmachineName,omitempty"`
|
||||
Scsipath string `protobuf:"bytes,15,opt,name=scsipath,proto3" json:"scsipath,omitempty"`
|
||||
AttachedVirtualmachineName string `protobuf:"bytes,16,opt,name=attachedVirtualmachineName,proto3" json:"attachedVirtualmachineName,omitempty"`
|
||||
AttachedNodeName string `protobuf:"bytes,17,opt,name=attachedNodeName,proto3" json:"attachedNodeName,omitempty"`
|
||||
GroupName string `protobuf:"bytes,18,opt,name=groupName,proto3" json:"groupName,omitempty"`
|
||||
LocationName string `protobuf:"bytes,19,opt,name=locationName,proto3" json:"locationName,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) Reset() { *m = VirtualHardDisk{} }
|
||||
func (m *VirtualHardDisk) String() string { return proto.CompactTextString(m) }
|
||||
func (*VirtualHardDisk) ProtoMessage() {}
|
||||
func (*VirtualHardDisk) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f4b382f86170a6e5, []int{2}
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_VirtualHardDisk.Unmarshal(m, b)
|
||||
}
|
||||
func (m *VirtualHardDisk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_VirtualHardDisk.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *VirtualHardDisk) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_VirtualHardDisk.Merge(m, src)
|
||||
}
|
||||
func (m *VirtualHardDisk) XXX_Size() int {
|
||||
return xxx_messageInfo_VirtualHardDisk.Size(m)
|
||||
}
|
||||
func (m *VirtualHardDisk) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_VirtualHardDisk.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_VirtualHardDisk proto.InternalMessageInfo
|
||||
|
||||
func (m *VirtualHardDisk) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetContainerName() string {
|
||||
if m != nil {
|
||||
return m.ContainerName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetPath() string {
|
||||
if m != nil {
|
||||
return m.Path
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetStatus() *common.Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetSize() int64 {
|
||||
if m != nil {
|
||||
return m.Size
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetDynamic() bool {
|
||||
if m != nil {
|
||||
return m.Dynamic
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetBlocksizebytes() int32 {
|
||||
if m != nil {
|
||||
return m.Blocksizebytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetLogicalsectorbytes() int32 {
|
||||
if m != nil {
|
||||
return m.Logicalsectorbytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetPhysicalsectorbytes() int32 {
|
||||
if m != nil {
|
||||
return m.Physicalsectorbytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetControllernumber() int64 {
|
||||
if m != nil {
|
||||
return m.Controllernumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetControllerlocation() int64 {
|
||||
if m != nil {
|
||||
return m.Controllerlocation
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetDisknumber() int64 {
|
||||
if m != nil {
|
||||
return m.Disknumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetVirtualmachineName() string {
|
||||
if m != nil {
|
||||
return m.VirtualmachineName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetScsipath() string {
|
||||
if m != nil {
|
||||
return m.Scsipath
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetAttachedVirtualmachineName() string {
|
||||
if m != nil {
|
||||
return m.AttachedVirtualmachineName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetAttachedNodeName() string {
|
||||
if m != nil {
|
||||
return m.AttachedNodeName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetGroupName() string {
|
||||
if m != nil {
|
||||
return m.GroupName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *VirtualHardDisk) GetLocationName() string {
|
||||
if m != nil {
|
||||
return m.LocationName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*VirtualHardDiskRequest)(nil), "moc.cloudagent.storage.VirtualHardDiskRequest")
|
||||
proto.RegisterType((*VirtualHardDiskResponse)(nil), "moc.cloudagent.storage.VirtualHardDiskResponse")
|
||||
proto.RegisterType((*VirtualHardDisk)(nil), "moc.cloudagent.storage.VirtualHardDisk")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("virtualharddisk.proto", fileDescriptor_f4b382f86170a6e5) }
|
||||
|
||||
var fileDescriptor_f4b382f86170a6e5 = []byte{
|
||||
// 599 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xc1, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0x86, 0x71, 0xdb, 0xa4, 0xcd, 0xa4, 0x4d, 0xcb, 0xb6, 0x94, 0x55, 0x84, 0xaa, 0x28, 0x20,
|
||||
0x88, 0x38, 0xd8, 0x10, 0x38, 0x23, 0x51, 0x81, 0x04, 0x97, 0x22, 0xb9, 0xa8, 0x07, 0x6e, 0x9b,
|
||||
0xf5, 0xd6, 0x59, 0x65, 0xed, 0x31, 0xbb, 0xeb, 0xa2, 0x70, 0xe5, 0x51, 0x78, 0x09, 0xce, 0x3c,
|
||||
0x19, 0xf2, 0x38, 0x69, 0xa9, 0x13, 0xa1, 0x5e, 0xb8, 0xed, 0xfe, 0xff, 0x37, 0xbf, 0x27, 0x63,
|
||||
0x4f, 0xe0, 0xc1, 0x95, 0xb6, 0xbe, 0x14, 0x66, 0x2a, 0x6c, 0x92, 0x68, 0x37, 0x0b, 0x0b, 0x8b,
|
||||
0x1e, 0xd9, 0x71, 0x86, 0x32, 0x94, 0x06, 0xcb, 0x44, 0xa4, 0x2a, 0xf7, 0xa1, 0xf3, 0x68, 0x45,
|
||||
0xaa, 0xfa, 0x27, 0x29, 0x62, 0x6a, 0x54, 0x44, 0xd4, 0xa4, 0xbc, 0x8c, 0xbe, 0x59, 0x51, 0x14,
|
||||
0xca, 0xba, 0xba, 0xae, 0xbf, 0x2b, 0x31, 0xcb, 0x30, 0xaf, 0x6f, 0xc3, 0x9f, 0x01, 0x1c, 0x5f,
|
||||
0xd4, 0xf9, 0x1f, 0x84, 0x4d, 0xde, 0x69, 0x37, 0x8b, 0xd5, 0xd7, 0x52, 0x39, 0xcf, 0xce, 0xe1,
|
||||
0xa0, 0xe1, 0x38, 0x1e, 0x0c, 0x36, 0x47, 0xdd, 0xf1, 0xb3, 0x70, 0xfd, 0xb3, 0xc3, 0x66, 0xd2,
|
||||
0x4a, 0x00, 0x7b, 0x0d, 0x7b, 0x9f, 0x0a, 0x65, 0x85, 0xd7, 0x98, 0x7f, 0x9e, 0x17, 0x8a, 0x6f,
|
||||
0x0c, 0x82, 0x51, 0x6f, 0xdc, 0xa3, 0xc4, 0x6b, 0x27, 0xbe, 0x0d, 0x0d, 0x7f, 0x05, 0xf0, 0x70,
|
||||
0xa5, 0x4b, 0x57, 0x60, 0xee, 0xd4, 0xff, 0x69, 0x73, 0x0c, 0xed, 0x58, 0xb9, 0xd2, 0x78, 0xea,
|
||||
0xaf, 0x3b, 0xee, 0x87, 0xf5, 0x54, 0xc3, 0xe5, 0x54, 0xc3, 0x53, 0x44, 0x73, 0x21, 0x4c, 0xa9,
|
||||
0xe2, 0x05, 0xc9, 0x8e, 0xa0, 0xf5, 0xde, 0x5a, 0xb4, 0x7c, 0x73, 0x10, 0x8c, 0x3a, 0x71, 0x7d,
|
||||
0x19, 0xfe, 0x6e, 0xc1, 0x7e, 0x23, 0x9e, 0x31, 0xd8, 0xca, 0x45, 0xa6, 0x78, 0x40, 0x20, 0x9d,
|
||||
0x59, 0x0f, 0x36, 0x74, 0x42, 0x4f, 0xeb, 0xc4, 0x1b, 0x3a, 0x61, 0x4f, 0x60, 0x4f, 0x62, 0xee,
|
||||
0x85, 0xce, 0x95, 0x3d, 0xab, 0xe0, 0x3a, 0xf5, 0xb6, 0x58, 0x25, 0x15, 0xc2, 0x4f, 0xf9, 0x56,
|
||||
0x9d, 0x54, 0x9d, 0xd9, 0x63, 0x68, 0x3b, 0x2f, 0x7c, 0xe9, 0x78, 0x8b, 0x7a, 0xef, 0xd2, 0x18,
|
||||
0xce, 0x49, 0x8a, 0x17, 0x56, 0x55, 0xe8, 0xf4, 0x77, 0xc5, 0xdb, 0x83, 0x60, 0xb4, 0x19, 0xd3,
|
||||
0x99, 0x71, 0xd8, 0x4e, 0xe6, 0xb9, 0xc8, 0xb4, 0xe4, 0xdb, 0x83, 0x60, 0xb4, 0x13, 0x2f, 0xaf,
|
||||
0xec, 0x29, 0xf4, 0x26, 0x06, 0xe5, 0xac, 0xc2, 0x26, 0x73, 0xaf, 0x1c, 0xdf, 0x19, 0x04, 0xa3,
|
||||
0x56, 0xdc, 0x50, 0x59, 0x08, 0xcc, 0x60, 0xaa, 0xa5, 0x30, 0x4e, 0x49, 0x8f, 0xb6, 0x66, 0x3b,
|
||||
0xc4, 0xae, 0x71, 0xd8, 0x0b, 0x38, 0x2c, 0xa6, 0x73, 0xd7, 0x2c, 0x00, 0x2a, 0x58, 0x67, 0xb1,
|
||||
0xe7, 0x70, 0x50, 0x4d, 0xc0, 0xa2, 0x31, 0xca, 0xe6, 0x65, 0x36, 0x51, 0x96, 0x77, 0xe9, 0x37,
|
||||
0xac, 0xe8, 0x55, 0x37, 0x37, 0x9a, 0x41, 0x49, 0xdf, 0x13, 0xdf, 0x25, 0x7a, 0x8d, 0xc3, 0x4e,
|
||||
0x00, 0xaa, 0xfd, 0x5a, 0xa4, 0xee, 0x11, 0xf7, 0x97, 0x52, 0xe5, 0x2d, 0x56, 0x31, 0x13, 0x72,
|
||||
0xaa, 0x73, 0x45, 0xef, 0xa5, 0x47, 0xa3, 0x5f, 0xe3, 0xb0, 0x3e, 0xec, 0x38, 0xe9, 0x34, 0xbd,
|
||||
0xa0, 0x7d, 0xa2, 0xae, 0xef, 0xec, 0x0d, 0xf4, 0x85, 0xf7, 0x42, 0x4e, 0x55, 0x72, 0xb1, 0x9a,
|
||||
0x79, 0x40, 0xf4, 0x3f, 0x88, 0x6a, 0x0e, 0x4b, 0xf7, 0x0c, 0x93, 0xba, 0xea, 0x3e, 0x55, 0xad,
|
||||
0xe8, 0xec, 0x11, 0x74, 0x52, 0x8b, 0x65, 0x41, 0x10, 0x23, 0xe8, 0x46, 0x60, 0x43, 0xd8, 0x5d,
|
||||
0x4e, 0x80, 0x80, 0x43, 0x02, 0x6e, 0x69, 0xe3, 0x1f, 0x01, 0x1c, 0x35, 0x3e, 0xe2, 0xb7, 0xd5,
|
||||
0x46, 0xb1, 0x19, 0xb4, 0x3f, 0xe6, 0x57, 0x38, 0x53, 0x2c, 0xbc, 0xeb, 0xb2, 0xd5, 0xff, 0x2e,
|
||||
0xfd, 0xe8, 0xce, 0x7c, 0xbd, 0xe7, 0xc3, 0x7b, 0xa7, 0x2f, 0xbf, 0x44, 0xa9, 0xf6, 0xd3, 0x72,
|
||||
0x12, 0x4a, 0xcc, 0xa2, 0x4c, 0x4b, 0x8b, 0x0e, 0x2f, 0x7d, 0x94, 0xa1, 0x8c, 0x6c, 0x21, 0xa3,
|
||||
0x9b, 0xb0, 0x68, 0x11, 0x36, 0x69, 0xd3, 0xbe, 0xbe, 0xfa, 0x13, 0x00, 0x00, 0xff, 0xff, 0xd6,
|
||||
0xf9, 0x52, 0x41, 0x44, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// VirtualHardDiskAgentClient is the client API for VirtualHardDiskAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type VirtualHardDiskAgentClient interface {
|
||||
Invoke(ctx context.Context, in *VirtualHardDiskRequest, opts ...grpc.CallOption) (*VirtualHardDiskResponse, error)
|
||||
}
|
||||
|
||||
type virtualHardDiskAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewVirtualHardDiskAgentClient(cc *grpc.ClientConn) VirtualHardDiskAgentClient {
|
||||
return &virtualHardDiskAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *virtualHardDiskAgentClient) Invoke(ctx context.Context, in *VirtualHardDiskRequest, opts ...grpc.CallOption) (*VirtualHardDiskResponse, error) {
|
||||
out := new(VirtualHardDiskResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.cloudagent.storage.VirtualHardDiskAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// VirtualHardDiskAgentServer is the server API for VirtualHardDiskAgent service.
|
||||
type VirtualHardDiskAgentServer interface {
|
||||
Invoke(context.Context, *VirtualHardDiskRequest) (*VirtualHardDiskResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedVirtualHardDiskAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedVirtualHardDiskAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedVirtualHardDiskAgentServer) Invoke(ctx context.Context, req *VirtualHardDiskRequest) (*VirtualHardDiskResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterVirtualHardDiskAgentServer(s *grpc.Server, srv VirtualHardDiskAgentServer) {
|
||||
s.RegisterService(&_VirtualHardDiskAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _VirtualHardDiskAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(VirtualHardDiskRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VirtualHardDiskAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.cloudagent.storage.VirtualHardDiskAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VirtualHardDiskAgentServer).Invoke(ctx, req.(*VirtualHardDiskRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _VirtualHardDiskAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.cloudagent.storage.VirtualHardDiskAgent",
|
||||
HandlerType: (*VirtualHardDiskAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _VirtualHardDiskAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "virtualharddisk.proto",
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/cloudagent/storage";
|
||||
package moc.cloudagent.storage;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
message VirtualHardDiskRequest {
|
||||
repeated VirtualHardDisk VirtualHardDisks = 1;
|
||||
Operation OperationType = 2;
|
||||
}
|
||||
|
||||
message VirtualHardDiskResponse {
|
||||
repeated VirtualHardDisk VirtualHardDisks = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
message VirtualHardDisk {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
string containerName = 3;
|
||||
string path = 4;
|
||||
Status status = 5;
|
||||
int64 size = 6;
|
||||
bool dynamic = 7;
|
||||
int32 blocksizebytes = 8;
|
||||
int32 logicalsectorbytes = 9;
|
||||
int32 physicalsectorbytes = 10;
|
||||
int64 controllernumber = 11;
|
||||
int64 controllerlocation = 12;
|
||||
int64 disknumber = 13;
|
||||
string virtualmachineName = 14;
|
||||
string scsipath = 15;
|
||||
string attachedVirtualmachineName = 16;
|
||||
string attachedNodeName = 17;
|
||||
string groupName = 18;
|
||||
string locationName = 19;
|
||||
}
|
||||
|
||||
service VirtualHardDiskAgent {
|
||||
rpc Invoke(VirtualHardDiskRequest) returns (VirtualHardDiskResponse) {}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,338 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: admin/health/health.proto
|
||||
|
||||
package admin
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
empty "github.com/golang/protobuf/ptypes/empty"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
common "github.com/microsoft/moc-proto/rpc/common"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type HealthRequest struct {
|
||||
TimeoutSeconds uint32 `protobuf:"varint,1,opt,name=timeoutSeconds,proto3" json:"timeoutSeconds,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *HealthRequest) Reset() { *m = HealthRequest{} }
|
||||
func (m *HealthRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*HealthRequest) ProtoMessage() {}
|
||||
func (*HealthRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0288732ac75a82c3, []int{0}
|
||||
}
|
||||
|
||||
func (m *HealthRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_HealthRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *HealthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_HealthRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *HealthRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_HealthRequest.Merge(m, src)
|
||||
}
|
||||
func (m *HealthRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_HealthRequest.Size(m)
|
||||
}
|
||||
func (m *HealthRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_HealthRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_HealthRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *HealthRequest) GetTimeoutSeconds() uint32 {
|
||||
if m != nil {
|
||||
return m.TimeoutSeconds
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type HealthResponse struct {
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
State common.HealthState `protobuf:"varint,4,opt,name=State,proto3,enum=moc.HealthState" json:"State,omitempty"`
|
||||
Rebooted bool `protobuf:"varint,5,opt,name=Rebooted,proto3" json:"Rebooted,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *HealthResponse) Reset() { *m = HealthResponse{} }
|
||||
func (m *HealthResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*HealthResponse) ProtoMessage() {}
|
||||
func (*HealthResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0288732ac75a82c3, []int{1}
|
||||
}
|
||||
|
||||
func (m *HealthResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_HealthResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *HealthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_HealthResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *HealthResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_HealthResponse.Merge(m, src)
|
||||
}
|
||||
func (m *HealthResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_HealthResponse.Size(m)
|
||||
}
|
||||
func (m *HealthResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_HealthResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_HealthResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *HealthResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *HealthResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *HealthResponse) GetState() common.HealthState {
|
||||
if m != nil {
|
||||
return m.State
|
||||
}
|
||||
return common.HealthState_NOTKNOWN
|
||||
}
|
||||
|
||||
func (m *HealthResponse) GetRebooted() bool {
|
||||
if m != nil {
|
||||
return m.Rebooted
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type AgentInfoResponse struct {
|
||||
Node *common.NodeInfo `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *AgentInfoResponse) Reset() { *m = AgentInfoResponse{} }
|
||||
func (m *AgentInfoResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*AgentInfoResponse) ProtoMessage() {}
|
||||
func (*AgentInfoResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0288732ac75a82c3, []int{2}
|
||||
}
|
||||
|
||||
func (m *AgentInfoResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AgentInfoResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *AgentInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_AgentInfoResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *AgentInfoResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_AgentInfoResponse.Merge(m, src)
|
||||
}
|
||||
func (m *AgentInfoResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_AgentInfoResponse.Size(m)
|
||||
}
|
||||
func (m *AgentInfoResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_AgentInfoResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_AgentInfoResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *AgentInfoResponse) GetNode() *common.NodeInfo {
|
||||
if m != nil {
|
||||
return m.Node
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AgentInfoResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *AgentInfoResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*HealthRequest)(nil), "moc.common.admin.HealthRequest")
|
||||
proto.RegisterType((*HealthResponse)(nil), "moc.common.admin.HealthResponse")
|
||||
proto.RegisterType((*AgentInfoResponse)(nil), "moc.common.admin.AgentInfoResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("admin/health/health.proto", fileDescriptor_0288732ac75a82c3) }
|
||||
|
||||
var fileDescriptor_0288732ac75a82c3 = []byte{
|
||||
// 390 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0x4d, 0x6b, 0xd5, 0x40,
|
||||
0x14, 0xed, 0x68, 0x5f, 0xa9, 0x93, 0x36, 0xd4, 0xa1, 0x48, 0x8c, 0xa0, 0x21, 0x42, 0x89, 0x08,
|
||||
0x33, 0x10, 0x17, 0xae, 0xad, 0x14, 0x75, 0xa1, 0x8b, 0x29, 0xb8, 0x70, 0x97, 0x8f, 0x9b, 0x0f,
|
||||
0xcc, 0xcc, 0x8d, 0x93, 0x09, 0xe2, 0x2f, 0xf0, 0x5f, 0xf8, 0x1b, 0xfc, 0x89, 0x92, 0x99, 0xbc,
|
||||
0x87, 0xbe, 0x87, 0xbb, 0xae, 0xc2, 0xbd, 0xf7, 0xe4, 0xdc, 0x73, 0xce, 0x1d, 0xfa, 0xb8, 0xa8,
|
||||
0x55, 0xaf, 0x45, 0x07, 0xc5, 0x60, 0xbb, 0xf5, 0xc3, 0x47, 0x83, 0x16, 0xd9, 0x85, 0xc2, 0x8a,
|
||||
0x57, 0xa8, 0x14, 0x6a, 0xee, 0x50, 0xf1, 0x93, 0x16, 0xb1, 0x1d, 0x40, 0xb8, 0x79, 0x39, 0x37,
|
||||
0x02, 0xd4, 0x68, 0x7f, 0x78, 0x78, 0xfc, 0x74, 0x7f, 0xf8, 0xdd, 0x14, 0xe3, 0x08, 0x66, 0x5a,
|
||||
0xe7, 0x67, 0x2b, 0x95, 0xaf, 0x42, 0x8d, 0x35, 0xf4, 0xba, 0x41, 0x5f, 0xa7, 0xaf, 0xe9, 0xf9,
|
||||
0x7b, 0xb7, 0x5c, 0xc2, 0xb7, 0x19, 0x26, 0xcb, 0xae, 0x68, 0x68, 0x7b, 0x05, 0x38, 0xdb, 0x5b,
|
||||
0xa8, 0x50, 0xd7, 0x53, 0x44, 0x12, 0x92, 0x9d, 0xcb, 0xbd, 0x6e, 0xfa, 0x8b, 0xd0, 0x70, 0xfb,
|
||||
0xe7, 0x34, 0xa2, 0x9e, 0x80, 0xe5, 0xf4, 0x44, 0xc2, 0x34, 0x0f, 0x36, 0xba, 0x97, 0x90, 0x2c,
|
||||
0xc8, 0x63, 0xee, 0xa5, 0xf1, 0xad, 0x34, 0x7e, 0x8d, 0x38, 0x7c, 0x2e, 0x86, 0x19, 0xe4, 0x8a,
|
||||
0x64, 0x97, 0x74, 0x73, 0x63, 0x0c, 0x9a, 0xe8, 0x7e, 0x42, 0xb2, 0x07, 0xd2, 0x17, 0xec, 0x8a,
|
||||
0x6e, 0x6e, 0x6d, 0x61, 0x21, 0x3a, 0x4e, 0x48, 0x16, 0xe6, 0x17, 0x7c, 0x89, 0xc4, 0x6f, 0x73,
|
||||
0x7d, 0xe9, 0xc7, 0x2c, 0xa6, 0xa7, 0x12, 0x4a, 0x44, 0x0b, 0x75, 0xb4, 0x49, 0x48, 0x76, 0x2a,
|
||||
0x77, 0x75, 0xfa, 0x93, 0xd0, 0x87, 0x6f, 0x5a, 0xd0, 0xf6, 0x83, 0x6e, 0x70, 0xa7, 0x31, 0xa3,
|
||||
0xc7, 0x4b, 0x02, 0xce, 0x54, 0x90, 0x5f, 0xf2, 0xbf, 0xb2, 0xfe, 0x84, 0x35, 0x38, 0xac, 0x43,
|
||||
0xdc, 0x9d, 0x9b, 0xfc, 0x37, 0xa1, 0x81, 0x17, 0xef, 0xf4, 0x30, 0x49, 0x83, 0xb7, 0x1d, 0x54,
|
||||
0x5f, 0x7d, 0x8f, 0x3d, 0xe3, 0xfb, 0x07, 0xe7, 0xff, 0x9c, 0x24, 0x4e, 0xfe, 0x0f, 0xf0, 0xae,
|
||||
0xd2, 0x23, 0xf6, 0x91, 0x9e, 0xbd, 0x03, 0xbb, 0xf3, 0xcb, 0x1e, 0x1d, 0xa8, 0xbd, 0x59, 0xde,
|
||||
0x4c, 0xfc, 0xfc, 0x90, 0xeb, 0x20, 0xa4, 0xf4, 0xe8, 0xfa, 0xe5, 0x97, 0x17, 0x6d, 0x6f, 0xbb,
|
||||
0xb9, 0x5c, 0xa0, 0x42, 0xf5, 0x95, 0xc1, 0x09, 0x1b, 0x2b, 0x14, 0x56, 0xc2, 0x8c, 0x95, 0xf0,
|
||||
0x04, 0xc2, 0x11, 0x94, 0x27, 0x6e, 0xc7, 0xab, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0x87,
|
||||
0xd0, 0x1b, 0xd4, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// HealthAgentClient is the client API for HealthAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type HealthAgentClient interface {
|
||||
CheckHealth(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error)
|
||||
GetAgentInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AgentInfoResponse, error)
|
||||
}
|
||||
|
||||
type healthAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewHealthAgentClient(cc *grpc.ClientConn) HealthAgentClient {
|
||||
return &healthAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *healthAgentClient) CheckHealth(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) {
|
||||
out := new(HealthResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.common.admin.HealthAgent/CheckHealth", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *healthAgentClient) GetAgentInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AgentInfoResponse, error) {
|
||||
out := new(AgentInfoResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.common.admin.HealthAgent/GetAgentInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// HealthAgentServer is the server API for HealthAgent service.
|
||||
type HealthAgentServer interface {
|
||||
CheckHealth(context.Context, *HealthRequest) (*HealthResponse, error)
|
||||
GetAgentInfo(context.Context, *empty.Empty) (*AgentInfoResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedHealthAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedHealthAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedHealthAgentServer) CheckHealth(ctx context.Context, req *HealthRequest) (*HealthResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CheckHealth not implemented")
|
||||
}
|
||||
func (*UnimplementedHealthAgentServer) GetAgentInfo(ctx context.Context, req *empty.Empty) (*AgentInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAgentInfo not implemented")
|
||||
}
|
||||
|
||||
func RegisterHealthAgentServer(s *grpc.Server, srv HealthAgentServer) {
|
||||
s.RegisterService(&_HealthAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _HealthAgent_CheckHealth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(HealthRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HealthAgentServer).CheckHealth(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.common.admin.HealthAgent/CheckHealth",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HealthAgentServer).CheckHealth(ctx, req.(*HealthRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HealthAgent_GetAgentInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(empty.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HealthAgentServer).GetAgentInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.common.admin.HealthAgent/GetAgentInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HealthAgentServer).GetAgentInfo(ctx, req.(*empty.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _HealthAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.common.admin.HealthAgent",
|
||||
HandlerType: (*HealthAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "CheckHealth",
|
||||
Handler: _HealthAgent_CheckHealth_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetAgentInfo",
|
||||
Handler: _HealthAgent_GetAgentInfo_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "admin/health/health.proto",
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/common/admin";
|
||||
package moc.common.admin;
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
import "nodeinfo.proto";
|
||||
|
||||
message HealthRequest{
|
||||
uint32 timeoutSeconds = 1;
|
||||
}
|
||||
|
||||
message HealthResponse {
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
HealthState State = 4;
|
||||
bool Rebooted = 5;
|
||||
}
|
||||
|
||||
message AgentInfoResponse{
|
||||
NodeInfo node = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
service HealthAgent {
|
||||
rpc CheckHealth(HealthRequest) returns (HealthResponse) {}
|
||||
rpc GetAgentInfo(google.protobuf.Empty) returns (AgentInfoResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,470 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: admin/logging/logging.proto
|
||||
|
||||
package admin
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type LogRotateRequest struct {
|
||||
LogRotation *LogRotation `protobuf:"bytes,1,opt,name=logRotation,proto3" json:"logRotation,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LogRotateRequest) Reset() { *m = LogRotateRequest{} }
|
||||
func (m *LogRotateRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LogRotateRequest) ProtoMessage() {}
|
||||
func (*LogRotateRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_343ba182a88f29f3, []int{0}
|
||||
}
|
||||
|
||||
func (m *LogRotateRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LogRotateRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LogRotateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LogRotateRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LogRotateRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LogRotateRequest.Merge(m, src)
|
||||
}
|
||||
func (m *LogRotateRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_LogRotateRequest.Size(m)
|
||||
}
|
||||
func (m *LogRotateRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LogRotateRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LogRotateRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *LogRotateRequest) GetLogRotation() *LogRotation {
|
||||
if m != nil {
|
||||
return m.LogRotation
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type LogRotateResponse struct {
|
||||
Result bool `protobuf:"varint,1,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LogRotateResponse) Reset() { *m = LogRotateResponse{} }
|
||||
func (m *LogRotateResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LogRotateResponse) ProtoMessage() {}
|
||||
func (*LogRotateResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_343ba182a88f29f3, []int{1}
|
||||
}
|
||||
|
||||
func (m *LogRotateResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LogRotateResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LogRotateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LogRotateResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LogRotateResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LogRotateResponse.Merge(m, src)
|
||||
}
|
||||
func (m *LogRotateResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_LogRotateResponse.Size(m)
|
||||
}
|
||||
func (m *LogRotateResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LogRotateResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LogRotateResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *LogRotateResponse) GetResult() bool {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *LogRotateResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type LogRotation struct {
|
||||
Minutes int32 `protobuf:"varint,1,opt,name=minutes,proto3" json:"minutes,omitempty"`
|
||||
Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
||||
EnableTime bool `protobuf:"varint,3,opt,name=enableTime,proto3" json:"enableTime,omitempty"`
|
||||
EnableSize bool `protobuf:"varint,4,opt,name=enableSize,proto3" json:"enableSize,omitempty"`
|
||||
DisableTime bool `protobuf:"varint,5,opt,name=disableTime,proto3" json:"disableTime,omitempty"`
|
||||
DisableSize bool `protobuf:"varint,6,opt,name=disableSize,proto3" json:"disableSize,omitempty"`
|
||||
Limit int32 `protobuf:"varint,7,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LogRotation) Reset() { *m = LogRotation{} }
|
||||
func (m *LogRotation) String() string { return proto.CompactTextString(m) }
|
||||
func (*LogRotation) ProtoMessage() {}
|
||||
func (*LogRotation) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_343ba182a88f29f3, []int{2}
|
||||
}
|
||||
|
||||
func (m *LogRotation) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LogRotation.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LogRotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LogRotation.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LogRotation) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LogRotation.Merge(m, src)
|
||||
}
|
||||
func (m *LogRotation) XXX_Size() int {
|
||||
return xxx_messageInfo_LogRotation.Size(m)
|
||||
}
|
||||
func (m *LogRotation) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LogRotation.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LogRotation proto.InternalMessageInfo
|
||||
|
||||
func (m *LogRotation) GetMinutes() int32 {
|
||||
if m != nil {
|
||||
return m.Minutes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *LogRotation) GetSize() int32 {
|
||||
if m != nil {
|
||||
return m.Size
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *LogRotation) GetEnableTime() bool {
|
||||
if m != nil {
|
||||
return m.EnableTime
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *LogRotation) GetEnableSize() bool {
|
||||
if m != nil {
|
||||
return m.EnableSize
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *LogRotation) GetDisableTime() bool {
|
||||
if m != nil {
|
||||
return m.DisableTime
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *LogRotation) GetDisableSize() bool {
|
||||
if m != nil {
|
||||
return m.DisableSize
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *LogRotation) GetLimit() int32 {
|
||||
if m != nil {
|
||||
return m.Limit
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type LogRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LogRequest) Reset() { *m = LogRequest{} }
|
||||
func (m *LogRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LogRequest) ProtoMessage() {}
|
||||
func (*LogRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_343ba182a88f29f3, []int{3}
|
||||
}
|
||||
|
||||
func (m *LogRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LogRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LogRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LogRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LogRequest.Merge(m, src)
|
||||
}
|
||||
func (m *LogRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_LogRequest.Size(m)
|
||||
}
|
||||
func (m *LogRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LogRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LogRequest proto.InternalMessageInfo
|
||||
|
||||
type LogFileResponse struct {
|
||||
File []byte `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
|
||||
Done *wrappers.BoolValue `protobuf:"bytes,2,opt,name=done,proto3" json:"done,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LogFileResponse) Reset() { *m = LogFileResponse{} }
|
||||
func (m *LogFileResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*LogFileResponse) ProtoMessage() {}
|
||||
func (*LogFileResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_343ba182a88f29f3, []int{4}
|
||||
}
|
||||
|
||||
func (m *LogFileResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LogFileResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *LogFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LogFileResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *LogFileResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LogFileResponse.Merge(m, src)
|
||||
}
|
||||
func (m *LogFileResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_LogFileResponse.Size(m)
|
||||
}
|
||||
func (m *LogFileResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LogFileResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LogFileResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *LogFileResponse) GetFile() []byte {
|
||||
if m != nil {
|
||||
return m.File
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LogFileResponse) GetDone() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Done
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *LogFileResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*LogRotateRequest)(nil), "moc.common.admin.LogRotateRequest")
|
||||
proto.RegisterType((*LogRotateResponse)(nil), "moc.common.admin.LogRotateResponse")
|
||||
proto.RegisterType((*LogRotation)(nil), "moc.common.admin.LogRotation")
|
||||
proto.RegisterType((*LogRequest)(nil), "moc.common.admin.LogRequest")
|
||||
proto.RegisterType((*LogFileResponse)(nil), "moc.common.admin.LogFileResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("admin/logging/logging.proto", fileDescriptor_343ba182a88f29f3) }
|
||||
|
||||
var fileDescriptor_343ba182a88f29f3 = []byte{
|
||||
// 421 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcd, 0x8e, 0xd3, 0x30,
|
||||
0x10, 0xc7, 0x09, 0x6d, 0xba, 0xcb, 0x64, 0x25, 0x16, 0x6b, 0x85, 0xa2, 0x02, 0xab, 0x12, 0x2e,
|
||||
0x8b, 0x90, 0x1c, 0x54, 0x1e, 0x00, 0xed, 0x4a, 0x80, 0x84, 0x7a, 0x72, 0x11, 0x07, 0x6e, 0x49,
|
||||
0xea, 0x1a, 0x0b, 0xdb, 0x13, 0x62, 0x47, 0x48, 0xbc, 0x12, 0xcf, 0xc3, 0xfb, 0xa0, 0x8c, 0x37,
|
||||
0x34, 0xa0, 0xc2, 0xc9, 0x9e, 0x99, 0xff, 0xfc, 0x3c, 0x1f, 0x86, 0x47, 0xd5, 0xce, 0x6a, 0x57,
|
||||
0x1a, 0x54, 0x4a, 0x3b, 0x35, 0x9e, 0xbc, 0xed, 0x30, 0x20, 0x3b, 0xb7, 0xd8, 0xf0, 0x06, 0xad,
|
||||
0x45, 0xc7, 0x49, 0xb7, 0xbc, 0x54, 0x88, 0xca, 0xc8, 0x92, 0xe2, 0x75, 0xbf, 0x2f, 0xbf, 0x75,
|
||||
0x55, 0xdb, 0xca, 0xce, 0xc7, 0x8c, 0x62, 0x0b, 0xe7, 0x1b, 0x54, 0x02, 0x43, 0x15, 0xa4, 0x90,
|
||||
0x5f, 0x7b, 0xe9, 0x03, 0x7b, 0x0d, 0x99, 0xb9, 0xf5, 0x69, 0x74, 0x79, 0xb2, 0x4a, 0xae, 0xb2,
|
||||
0xf5, 0x13, 0xfe, 0x37, 0x9b, 0x6f, 0x0e, 0x22, 0x31, 0xcd, 0x28, 0xae, 0xe1, 0xc1, 0x04, 0xea,
|
||||
0x5b, 0x74, 0x5e, 0xb2, 0x87, 0xb0, 0x10, 0xd2, 0xf7, 0x26, 0x10, 0xf0, 0x54, 0xdc, 0x5a, 0xec,
|
||||
0x02, 0xd2, 0x37, 0x5d, 0x87, 0x5d, 0x7e, 0x77, 0x95, 0x5c, 0xdd, 0x13, 0xd1, 0x28, 0x7e, 0x26,
|
||||
0x90, 0x4d, 0xf8, 0x2c, 0x87, 0x13, 0xab, 0x5d, 0x1f, 0xa4, 0xa7, 0xf4, 0x54, 0x8c, 0x26, 0x63,
|
||||
0x30, 0xf7, 0xfa, 0xbb, 0xa4, 0xf4, 0x54, 0xd0, 0x9d, 0x5d, 0x02, 0x48, 0x57, 0xd5, 0x46, 0x7e,
|
||||
0xd0, 0x56, 0xe6, 0x33, 0x7a, 0x6f, 0xe2, 0x39, 0xc4, 0xb7, 0x43, 0xe6, 0x7c, 0x1a, 0x1f, 0x3c,
|
||||
0x6c, 0x05, 0xd9, 0x4e, 0xfb, 0xdf, 0x80, 0x94, 0x04, 0x53, 0xd7, 0x44, 0x41, 0x88, 0xc5, 0x1f,
|
||||
0x0a, 0x62, 0x5c, 0x40, 0x6a, 0xb4, 0xd5, 0x21, 0x3f, 0xa1, 0xc2, 0xa2, 0x51, 0x9c, 0x01, 0x0c,
|
||||
0x6d, 0xc5, 0x49, 0x17, 0x5f, 0xe0, 0xfe, 0x06, 0xd5, 0x5b, 0x6d, 0x0e, 0x63, 0x62, 0x30, 0xdf,
|
||||
0x6b, 0x23, 0xa9, 0xcb, 0x33, 0x41, 0x77, 0xc6, 0x61, 0xbe, 0x43, 0x17, 0x5b, 0xcc, 0xd6, 0x4b,
|
||||
0x1e, 0x77, 0xca, 0xc7, 0x9d, 0xf2, 0x1b, 0x44, 0xf3, 0xb1, 0x32, 0xbd, 0x14, 0xa4, 0x1b, 0x9e,
|
||||
0x96, 0x34, 0xd2, 0x59, 0x1c, 0x29, 0x19, 0xeb, 0x1f, 0x09, 0x9c, 0x6e, 0x50, 0x5d, 0x2b, 0xe9,
|
||||
0x02, 0x7b, 0x0f, 0xb3, 0x77, 0x32, 0xb0, 0xc7, 0xc7, 0xb7, 0x1a, 0xcb, 0x5b, 0x3e, 0x3d, 0x1a,
|
||||
0x9d, 0x96, 0x5b, 0xdc, 0x79, 0x99, 0xb0, 0x2d, 0x2c, 0xe2, 0xae, 0x59, 0xf1, 0xef, 0x4f, 0x32,
|
||||
0xfe, 0xae, 0xe5, 0xb3, 0xff, 0x6a, 0x46, 0xec, 0xcd, 0x8b, 0x4f, 0xcf, 0x95, 0x0e, 0x9f, 0xfb,
|
||||
0x7a, 0x90, 0x96, 0x56, 0x37, 0x1d, 0x7a, 0xdc, 0x87, 0xd2, 0x62, 0x53, 0x76, 0x6d, 0x53, 0x46,
|
||||
0x40, 0x49, 0x80, 0x7a, 0x41, 0xa3, 0x78, 0xf5, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x62, 0x4e,
|
||||
0x4e, 0x1d, 0x03, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// LogAgentClient is the client API for LogAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type LogAgentClient interface {
|
||||
Get(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (LogAgent_GetClient, error)
|
||||
Rotate(ctx context.Context, in *LogRotateRequest, opts ...grpc.CallOption) (*LogRotateResponse, error)
|
||||
}
|
||||
|
||||
type logAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewLogAgentClient(cc *grpc.ClientConn) LogAgentClient {
|
||||
return &logAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *logAgentClient) Get(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (LogAgent_GetClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_LogAgent_serviceDesc.Streams[0], "/moc.common.admin.LogAgent/Get", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &logAgentGetClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type LogAgent_GetClient interface {
|
||||
Recv() (*LogFileResponse, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type logAgentGetClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *logAgentGetClient) Recv() (*LogFileResponse, error) {
|
||||
m := new(LogFileResponse)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *logAgentClient) Rotate(ctx context.Context, in *LogRotateRequest, opts ...grpc.CallOption) (*LogRotateResponse, error) {
|
||||
out := new(LogRotateResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.common.admin.LogAgent/Rotate", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// LogAgentServer is the server API for LogAgent service.
|
||||
type LogAgentServer interface {
|
||||
Get(*LogRequest, LogAgent_GetServer) error
|
||||
Rotate(context.Context, *LogRotateRequest) (*LogRotateResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedLogAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedLogAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedLogAgentServer) Get(req *LogRequest, srv LogAgent_GetServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (*UnimplementedLogAgentServer) Rotate(ctx context.Context, req *LogRotateRequest) (*LogRotateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Rotate not implemented")
|
||||
}
|
||||
|
||||
func RegisterLogAgentServer(s *grpc.Server, srv LogAgentServer) {
|
||||
s.RegisterService(&_LogAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _LogAgent_Get_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(LogRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(LogAgentServer).Get(m, &logAgentGetServer{stream})
|
||||
}
|
||||
|
||||
type LogAgent_GetServer interface {
|
||||
Send(*LogFileResponse) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type logAgentGetServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *logAgentGetServer) Send(m *LogFileResponse) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _LogAgent_Rotate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LogRotateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(LogAgentServer).Rotate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.common.admin.LogAgent/Rotate",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(LogAgentServer).Rotate(ctx, req.(*LogRotateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _LogAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.common.admin.LogAgent",
|
||||
HandlerType: (*LogAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Rotate",
|
||||
Handler: _LogAgent_Rotate_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Get",
|
||||
Handler: _LogAgent_Get_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "admin/logging/logging.proto",
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/common/admin";
|
||||
package moc.common.admin;
|
||||
import "google/protobuf/wrappers.proto";
|
||||
|
||||
message LogRotateRequest {
|
||||
LogRotation logRotation = 1;
|
||||
}
|
||||
|
||||
message LogRotateResponse {
|
||||
bool Result = 1;
|
||||
string Error = 2;
|
||||
}
|
||||
|
||||
message LogRotation {
|
||||
int32 minutes = 1;
|
||||
int32 size = 2;
|
||||
bool enableTime = 3;
|
||||
bool enableSize = 4;
|
||||
bool disableTime = 5;
|
||||
bool disableSize = 6;
|
||||
int32 limit = 7;
|
||||
}
|
||||
|
||||
message LogRequest {}
|
||||
|
||||
message LogFileResponse {
|
||||
bytes file = 1;
|
||||
google.protobuf.BoolValue done = 2;
|
||||
string error = 3;
|
||||
}
|
||||
|
||||
service LogAgent {
|
||||
rpc Get(LogRequest) returns (stream LogFileResponse) {}
|
||||
rpc Rotate(LogRotateRequest) returns (LogRotateResponse) {}
|
||||
}
|
|
@ -0,0 +1,258 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: admin/recovery/recovery.proto
|
||||
|
||||
package admin
|
||||
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Operation int32
|
||||
|
||||
const (
|
||||
Operation_BACKUP Operation = 0
|
||||
Operation_RESTORE Operation = 1
|
||||
)
|
||||
|
||||
var Operation_name = map[int32]string{
|
||||
0: "BACKUP",
|
||||
1: "RESTORE",
|
||||
}
|
||||
|
||||
var Operation_value = map[string]int32{
|
||||
"BACKUP": 0,
|
||||
"RESTORE": 1,
|
||||
}
|
||||
|
||||
func (x Operation) String() string {
|
||||
return proto.EnumName(Operation_name, int32(x))
|
||||
}
|
||||
|
||||
func (Operation) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d6c726908b67e934, []int{0}
|
||||
}
|
||||
|
||||
type RecoveryRequest struct {
|
||||
OperationType Operation `protobuf:"varint,1,opt,name=OperationType,proto3,enum=moc.common.admin.Operation" json:"OperationType,omitempty"`
|
||||
// Path to back to or restore from
|
||||
Path string `protobuf:"bytes,2,opt,name=Path,proto3" json:"Path,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RecoveryRequest) Reset() { *m = RecoveryRequest{} }
|
||||
func (m *RecoveryRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*RecoveryRequest) ProtoMessage() {}
|
||||
func (*RecoveryRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d6c726908b67e934, []int{0}
|
||||
}
|
||||
|
||||
func (m *RecoveryRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RecoveryRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *RecoveryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_RecoveryRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *RecoveryRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_RecoveryRequest.Merge(m, src)
|
||||
}
|
||||
func (m *RecoveryRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_RecoveryRequest.Size(m)
|
||||
}
|
||||
func (m *RecoveryRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_RecoveryRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_RecoveryRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *RecoveryRequest) GetOperationType() Operation {
|
||||
if m != nil {
|
||||
return m.OperationType
|
||||
}
|
||||
return Operation_BACKUP
|
||||
}
|
||||
|
||||
func (m *RecoveryRequest) GetPath() string {
|
||||
if m != nil {
|
||||
return m.Path
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RecoveryResponse struct {
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RecoveryResponse) Reset() { *m = RecoveryResponse{} }
|
||||
func (m *RecoveryResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*RecoveryResponse) ProtoMessage() {}
|
||||
func (*RecoveryResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_d6c726908b67e934, []int{1}
|
||||
}
|
||||
|
||||
func (m *RecoveryResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RecoveryResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *RecoveryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_RecoveryResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *RecoveryResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_RecoveryResponse.Merge(m, src)
|
||||
}
|
||||
func (m *RecoveryResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_RecoveryResponse.Size(m)
|
||||
}
|
||||
func (m *RecoveryResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_RecoveryResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_RecoveryResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *RecoveryResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *RecoveryResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.common.admin.Operation", Operation_name, Operation_value)
|
||||
proto.RegisterType((*RecoveryRequest)(nil), "moc.common.admin.RecoveryRequest")
|
||||
proto.RegisterType((*RecoveryResponse)(nil), "moc.common.admin.RecoveryResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("admin/recovery/recovery.proto", fileDescriptor_d6c726908b67e934) }
|
||||
|
||||
var fileDescriptor_d6c726908b67e934 = []byte{
|
||||
// 306 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x5f, 0x4f, 0xc2, 0x30,
|
||||
0x14, 0xc5, 0x99, 0x7f, 0x66, 0xb8, 0x04, 0x5d, 0x1a, 0x1f, 0x08, 0x46, 0x83, 0x8b, 0x0f, 0xa8,
|
||||
0x49, 0x9b, 0xcc, 0x4f, 0x00, 0x86, 0x07, 0xe3, 0x03, 0x58, 0xd1, 0x07, 0xe3, 0xcb, 0x36, 0x2f,
|
||||
0x63, 0x71, 0xdb, 0xad, 0x5d, 0x87, 0xe1, 0xdb, 0x1b, 0x3b, 0xc0, 0x88, 0x89, 0x6f, 0xa7, 0xe9,
|
||||
0xef, 0x9c, 0x9e, 0x53, 0x38, 0x0d, 0xdf, 0xf2, 0xb4, 0x10, 0x1a, 0x63, 0x5a, 0xa0, 0x5e, 0x6e,
|
||||
0x04, 0x57, 0x9a, 0x0c, 0x31, 0x2f, 0xa7, 0x98, 0xc7, 0x94, 0xe7, 0x54, 0x70, 0x4b, 0x76, 0xcf,
|
||||
0x12, 0xa2, 0x24, 0x43, 0x61, 0xef, 0xa3, 0x6a, 0x26, 0x3e, 0x75, 0xa8, 0x14, 0xea, 0xb2, 0x76,
|
||||
0xf8, 0x73, 0x38, 0x92, 0xab, 0x0c, 0x89, 0x1f, 0x15, 0x96, 0x86, 0x0d, 0xa0, 0x3d, 0x56, 0xa8,
|
||||
0x43, 0x93, 0x52, 0x31, 0x5d, 0x2a, 0xec, 0x38, 0x3d, 0xa7, 0x7f, 0x18, 0x9c, 0xf0, 0xed, 0x70,
|
||||
0xbe, 0xc1, 0xe4, 0x6f, 0x07, 0x63, 0xb0, 0x37, 0x09, 0xcd, 0xbc, 0xb3, 0xd3, 0x73, 0xfa, 0x4d,
|
||||
0x69, 0xb5, 0xff, 0x0a, 0xde, 0xcf, 0x4b, 0xa5, 0xa2, 0xa2, 0x44, 0x16, 0x80, 0x2b, 0xb1, 0xac,
|
||||
0x32, 0x63, 0xc9, 0x56, 0xd0, 0xe5, 0x75, 0x5d, 0xbe, 0xae, 0xcb, 0x87, 0x44, 0xd9, 0x73, 0x98,
|
||||
0x55, 0x28, 0x57, 0x24, 0x3b, 0x86, 0xfd, 0x91, 0xd6, 0xa4, 0x3b, 0xbb, 0x36, 0xbc, 0x3e, 0x5c,
|
||||
0x5d, 0x40, 0x73, 0x53, 0x81, 0x01, 0xb8, 0xc3, 0xc1, 0xed, 0xfd, 0xd3, 0xc4, 0x6b, 0xb0, 0x16,
|
||||
0x1c, 0xc8, 0xd1, 0xe3, 0x74, 0x2c, 0x47, 0x9e, 0x13, 0x44, 0xd0, 0x5e, 0x77, 0x18, 0x24, 0x58,
|
||||
0x18, 0xf6, 0x00, 0xee, 0x5d, 0xb1, 0xa0, 0x77, 0x64, 0xe7, 0x7f, 0xe7, 0x6d, 0x7d, 0x4c, 0xd7,
|
||||
0xff, 0x0f, 0xa9, 0x17, 0xf9, 0x8d, 0xe1, 0xf5, 0xcb, 0x65, 0x92, 0x9a, 0x79, 0x15, 0x7d, 0x93,
|
||||
0x22, 0x4f, 0x63, 0x4d, 0x25, 0xcd, 0x8c, 0xc8, 0x29, 0x16, 0x5a, 0xc5, 0xa2, 0xf6, 0x0b, 0xeb,
|
||||
0x8f, 0x5c, 0x3b, 0xf4, 0xe6, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xd7, 0xac, 0xe1, 0xf5, 0xd8, 0x01,
|
||||
0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConn
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion4
|
||||
|
||||
// RecoveryAgentClient is the client API for RecoveryAgent service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type RecoveryAgentClient interface {
|
||||
Invoke(ctx context.Context, in *RecoveryRequest, opts ...grpc.CallOption) (*RecoveryResponse, error)
|
||||
}
|
||||
|
||||
type recoveryAgentClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewRecoveryAgentClient(cc *grpc.ClientConn) RecoveryAgentClient {
|
||||
return &recoveryAgentClient{cc}
|
||||
}
|
||||
|
||||
func (c *recoveryAgentClient) Invoke(ctx context.Context, in *RecoveryRequest, opts ...grpc.CallOption) (*RecoveryResponse, error) {
|
||||
out := new(RecoveryResponse)
|
||||
err := c.cc.Invoke(ctx, "/moc.common.admin.RecoveryAgent/Invoke", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RecoveryAgentServer is the server API for RecoveryAgent service.
|
||||
type RecoveryAgentServer interface {
|
||||
Invoke(context.Context, *RecoveryRequest) (*RecoveryResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRecoveryAgentServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedRecoveryAgentServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedRecoveryAgentServer) Invoke(ctx context.Context, req *RecoveryRequest) (*RecoveryResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented")
|
||||
}
|
||||
|
||||
func RegisterRecoveryAgentServer(s *grpc.Server, srv RecoveryAgentServer) {
|
||||
s.RegisterService(&_RecoveryAgent_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _RecoveryAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RecoveryRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RecoveryAgentServer).Invoke(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/moc.common.admin.RecoveryAgent/Invoke",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RecoveryAgentServer).Invoke(ctx, req.(*RecoveryRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _RecoveryAgent_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "moc.common.admin.RecoveryAgent",
|
||||
HandlerType: (*RecoveryAgentServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Invoke",
|
||||
Handler: _RecoveryAgent_Invoke_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "admin/recovery/recovery.proto",
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/common/admin";
|
||||
package moc.common.admin;
|
||||
|
||||
import "google/protobuf/wrappers.proto";
|
||||
|
||||
enum Operation {
|
||||
BACKUP = 0;
|
||||
RESTORE = 1;
|
||||
}
|
||||
|
||||
message RecoveryRequest{
|
||||
Operation OperationType = 1;
|
||||
// Path to back to or restore from
|
||||
string Path = 2;
|
||||
}
|
||||
|
||||
message RecoveryResponse {
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
||||
|
||||
service RecoveryAgent {
|
||||
rpc Invoke(RecoveryRequest) returns (RecoveryResponse) {}
|
||||
}
|
||||
|
|
@ -0,0 +1,530 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: common.proto
|
||||
|
||||
package common
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Operation int32
|
||||
|
||||
const (
|
||||
Operation_GET Operation = 0
|
||||
Operation_POST Operation = 1
|
||||
Operation_DELETE Operation = 2
|
||||
Operation_UPDATE Operation = 3
|
||||
)
|
||||
|
||||
var Operation_name = map[int32]string{
|
||||
0: "GET",
|
||||
1: "POST",
|
||||
2: "DELETE",
|
||||
3: "UPDATE",
|
||||
}
|
||||
|
||||
var Operation_value = map[string]int32{
|
||||
"GET": 0,
|
||||
"POST": 1,
|
||||
"DELETE": 2,
|
||||
"UPDATE": 3,
|
||||
}
|
||||
|
||||
func (x Operation) String() string {
|
||||
return proto.EnumName(Operation_name, int32(x))
|
||||
}
|
||||
|
||||
func (Operation) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_555bd8c177793206, []int{0}
|
||||
}
|
||||
|
||||
type ProvisionState int32
|
||||
|
||||
const (
|
||||
ProvisionState_UNKNOWN ProvisionState = 0
|
||||
ProvisionState_CREATING ProvisionState = 1
|
||||
ProvisionState_CREATED ProvisionState = 2
|
||||
ProvisionState_CREATE_FAILED ProvisionState = 3
|
||||
ProvisionState_DELETING ProvisionState = 4
|
||||
ProvisionState_DELETE_FAILED ProvisionState = 5
|
||||
ProvisionState_DELETED ProvisionState = 6
|
||||
ProvisionState_UPDATING ProvisionState = 7
|
||||
ProvisionState_UPDATE_FAILED ProvisionState = 8
|
||||
ProvisionState_UPDATED ProvisionState = 9
|
||||
ProvisionState_PROVISIONING ProvisionState = 10
|
||||
ProvisionState_PROVISIONED ProvisionState = 11
|
||||
ProvisionState_PROVISION_FAILED ProvisionState = 12
|
||||
ProvisionState_DEPROVISIONING ProvisionState = 13
|
||||
ProvisionState_DEPROVISIONED ProvisionState = 14
|
||||
ProvisionState_DEPROVISION_FAILED ProvisionState = 15
|
||||
)
|
||||
|
||||
var ProvisionState_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "CREATING",
|
||||
2: "CREATED",
|
||||
3: "CREATE_FAILED",
|
||||
4: "DELETING",
|
||||
5: "DELETE_FAILED",
|
||||
6: "DELETED",
|
||||
7: "UPDATING",
|
||||
8: "UPDATE_FAILED",
|
||||
9: "UPDATED",
|
||||
10: "PROVISIONING",
|
||||
11: "PROVISIONED",
|
||||
12: "PROVISION_FAILED",
|
||||
13: "DEPROVISIONING",
|
||||
14: "DEPROVISIONED",
|
||||
15: "DEPROVISION_FAILED",
|
||||
}
|
||||
|
||||
var ProvisionState_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"CREATING": 1,
|
||||
"CREATED": 2,
|
||||
"CREATE_FAILED": 3,
|
||||
"DELETING": 4,
|
||||
"DELETE_FAILED": 5,
|
||||
"DELETED": 6,
|
||||
"UPDATING": 7,
|
||||
"UPDATE_FAILED": 8,
|
||||
"UPDATED": 9,
|
||||
"PROVISIONING": 10,
|
||||
"PROVISIONED": 11,
|
||||
"PROVISION_FAILED": 12,
|
||||
"DEPROVISIONING": 13,
|
||||
"DEPROVISIONED": 14,
|
||||
"DEPROVISION_FAILED": 15,
|
||||
}
|
||||
|
||||
func (x ProvisionState) String() string {
|
||||
return proto.EnumName(ProvisionState_name, int32(x))
|
||||
}
|
||||
|
||||
func (ProvisionState) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_555bd8c177793206, []int{1}
|
||||
}
|
||||
|
||||
type HighAvailabilityState int32
|
||||
|
||||
const (
|
||||
HighAvailabilityState_UNKNOWN_HA_STATE HighAvailabilityState = 0
|
||||
HighAvailabilityState_STABLE HighAvailabilityState = 1
|
||||
HighAvailabilityState_PENDING HighAvailabilityState = 2
|
||||
)
|
||||
|
||||
var HighAvailabilityState_name = map[int32]string{
|
||||
0: "UNKNOWN_HA_STATE",
|
||||
1: "STABLE",
|
||||
2: "PENDING",
|
||||
}
|
||||
|
||||
var HighAvailabilityState_value = map[string]int32{
|
||||
"UNKNOWN_HA_STATE": 0,
|
||||
"STABLE": 1,
|
||||
"PENDING": 2,
|
||||
}
|
||||
|
||||
func (x HighAvailabilityState) String() string {
|
||||
return proto.EnumName(HighAvailabilityState_name, int32(x))
|
||||
}
|
||||
|
||||
func (HighAvailabilityState) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_555bd8c177793206, []int{2}
|
||||
}
|
||||
|
||||
type HealthState int32
|
||||
|
||||
const (
|
||||
HealthState_NOTKNOWN HealthState = 0
|
||||
HealthState_OK HealthState = 1
|
||||
HealthState_WARNING HealthState = 2
|
||||
HealthState_CRITICAL HealthState = 3
|
||||
// The entity went missing from the platform
|
||||
HealthState_MISSING HealthState = 4
|
||||
HealthState_DEGRADED HealthState = 5
|
||||
// The entity went missing from the agent
|
||||
HealthState_NOTFOUND HealthState = 6
|
||||
)
|
||||
|
||||
var HealthState_name = map[int32]string{
|
||||
0: "NOTKNOWN",
|
||||
1: "OK",
|
||||
2: "WARNING",
|
||||
3: "CRITICAL",
|
||||
4: "MISSING",
|
||||
5: "DEGRADED",
|
||||
6: "NOTFOUND",
|
||||
}
|
||||
|
||||
var HealthState_value = map[string]int32{
|
||||
"NOTKNOWN": 0,
|
||||
"OK": 1,
|
||||
"WARNING": 2,
|
||||
"CRITICAL": 3,
|
||||
"MISSING": 4,
|
||||
"DEGRADED": 5,
|
||||
"NOTFOUND": 6,
|
||||
}
|
||||
|
||||
func (x HealthState) String() string {
|
||||
return proto.EnumName(HealthState_name, int32(x))
|
||||
}
|
||||
|
||||
func (HealthState) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_555bd8c177793206, []int{3}
|
||||
}
|
||||
|
||||
type Error struct {
|
||||
Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"Message,omitempty"`
|
||||
Code int32 `protobuf:"varint,2,opt,name=Code,proto3" json:"Code,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Error) Reset() { *m = Error{} }
|
||||
func (m *Error) String() string { return proto.CompactTextString(m) }
|
||||
func (*Error) ProtoMessage() {}
|
||||
func (*Error) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_555bd8c177793206, []int{0}
|
||||
}
|
||||
|
||||
func (m *Error) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Error.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Error.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Error) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Error.Merge(m, src)
|
||||
}
|
||||
func (m *Error) XXX_Size() int {
|
||||
return xxx_messageInfo_Error.Size(m)
|
||||
}
|
||||
func (m *Error) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Error.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Error proto.InternalMessageInfo
|
||||
|
||||
func (m *Error) GetMessage() string {
|
||||
if m != nil {
|
||||
return m.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Error) GetCode() int32 {
|
||||
if m != nil {
|
||||
return m.Code
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ProvisionStatus struct {
|
||||
CurrentState ProvisionState `protobuf:"varint,1,opt,name=currentState,proto3,enum=moc.ProvisionState" json:"currentState,omitempty"`
|
||||
PreviousState ProvisionState `protobuf:"varint,2,opt,name=previousState,proto3,enum=moc.ProvisionState" json:"previousState,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ProvisionStatus) Reset() { *m = ProvisionStatus{} }
|
||||
func (m *ProvisionStatus) String() string { return proto.CompactTextString(m) }
|
||||
func (*ProvisionStatus) ProtoMessage() {}
|
||||
func (*ProvisionStatus) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_555bd8c177793206, []int{1}
|
||||
}
|
||||
|
||||
func (m *ProvisionStatus) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ProvisionStatus.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ProvisionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ProvisionStatus.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ProvisionStatus) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ProvisionStatus.Merge(m, src)
|
||||
}
|
||||
func (m *ProvisionStatus) XXX_Size() int {
|
||||
return xxx_messageInfo_ProvisionStatus.Size(m)
|
||||
}
|
||||
func (m *ProvisionStatus) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ProvisionStatus.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ProvisionStatus proto.InternalMessageInfo
|
||||
|
||||
func (m *ProvisionStatus) GetCurrentState() ProvisionState {
|
||||
if m != nil {
|
||||
return m.CurrentState
|
||||
}
|
||||
return ProvisionState_UNKNOWN
|
||||
}
|
||||
|
||||
func (m *ProvisionStatus) GetPreviousState() ProvisionState {
|
||||
if m != nil {
|
||||
return m.PreviousState
|
||||
}
|
||||
return ProvisionState_UNKNOWN
|
||||
}
|
||||
|
||||
type Health struct {
|
||||
CurrentState HealthState `protobuf:"varint,1,opt,name=currentState,proto3,enum=moc.HealthState" json:"currentState,omitempty"`
|
||||
PreviousState HealthState `protobuf:"varint,2,opt,name=previousState,proto3,enum=moc.HealthState" json:"previousState,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Health) Reset() { *m = Health{} }
|
||||
func (m *Health) String() string { return proto.CompactTextString(m) }
|
||||
func (*Health) ProtoMessage() {}
|
||||
func (*Health) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_555bd8c177793206, []int{2}
|
||||
}
|
||||
|
||||
func (m *Health) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Health.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Health) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Health.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Health) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Health.Merge(m, src)
|
||||
}
|
||||
func (m *Health) XXX_Size() int {
|
||||
return xxx_messageInfo_Health.Size(m)
|
||||
}
|
||||
func (m *Health) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Health.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Health proto.InternalMessageInfo
|
||||
|
||||
func (m *Health) GetCurrentState() HealthState {
|
||||
if m != nil {
|
||||
return m.CurrentState
|
||||
}
|
||||
return HealthState_NOTKNOWN
|
||||
}
|
||||
|
||||
func (m *Health) GetPreviousState() HealthState {
|
||||
if m != nil {
|
||||
return m.PreviousState
|
||||
}
|
||||
return HealthState_NOTKNOWN
|
||||
}
|
||||
|
||||
type Version struct {
|
||||
Number string `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Version) Reset() { *m = Version{} }
|
||||
func (m *Version) String() string { return proto.CompactTextString(m) }
|
||||
func (*Version) ProtoMessage() {}
|
||||
func (*Version) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_555bd8c177793206, []int{3}
|
||||
}
|
||||
|
||||
func (m *Version) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Version.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Version.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Version) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Version.Merge(m, src)
|
||||
}
|
||||
func (m *Version) XXX_Size() int {
|
||||
return xxx_messageInfo_Version.Size(m)
|
||||
}
|
||||
func (m *Version) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Version.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Version proto.InternalMessageInfo
|
||||
|
||||
func (m *Version) GetNumber() string {
|
||||
if m != nil {
|
||||
return m.Number
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Status struct {
|
||||
Health *Health `protobuf:"bytes,1,opt,name=health,proto3" json:"health,omitempty"`
|
||||
ProvisioningStatus *ProvisionStatus `protobuf:"bytes,2,opt,name=provisioningStatus,proto3" json:"provisioningStatus,omitempty"`
|
||||
LastError *Error `protobuf:"bytes,3,opt,name=lastError,proto3" json:"lastError,omitempty"`
|
||||
Version *Version `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Status) Reset() { *m = Status{} }
|
||||
func (m *Status) String() string { return proto.CompactTextString(m) }
|
||||
func (*Status) ProtoMessage() {}
|
||||
func (*Status) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_555bd8c177793206, []int{4}
|
||||
}
|
||||
|
||||
func (m *Status) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Status.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Status.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Status) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Status.Merge(m, src)
|
||||
}
|
||||
func (m *Status) XXX_Size() int {
|
||||
return xxx_messageInfo_Status.Size(m)
|
||||
}
|
||||
func (m *Status) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Status.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Status proto.InternalMessageInfo
|
||||
|
||||
func (m *Status) GetHealth() *Health {
|
||||
if m != nil {
|
||||
return m.Health
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Status) GetProvisioningStatus() *ProvisionStatus {
|
||||
if m != nil {
|
||||
return m.ProvisioningStatus
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Status) GetLastError() *Error {
|
||||
if m != nil {
|
||||
return m.LastError
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Status) GetVersion() *Version {
|
||||
if m != nil {
|
||||
return m.Version
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Entity struct {
|
||||
IsPlaceholder bool `protobuf:"varint,1,opt,name=IsPlaceholder,proto3" json:"IsPlaceholder,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Entity) Reset() { *m = Entity{} }
|
||||
func (m *Entity) String() string { return proto.CompactTextString(m) }
|
||||
func (*Entity) ProtoMessage() {}
|
||||
func (*Entity) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_555bd8c177793206, []int{5}
|
||||
}
|
||||
|
||||
func (m *Entity) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Entity.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Entity.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Entity) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Entity.Merge(m, src)
|
||||
}
|
||||
func (m *Entity) XXX_Size() int {
|
||||
return xxx_messageInfo_Entity.Size(m)
|
||||
}
|
||||
func (m *Entity) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Entity.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Entity proto.InternalMessageInfo
|
||||
|
||||
func (m *Entity) GetIsPlaceholder() bool {
|
||||
if m != nil {
|
||||
return m.IsPlaceholder
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.Operation", Operation_name, Operation_value)
|
||||
proto.RegisterEnum("moc.ProvisionState", ProvisionState_name, ProvisionState_value)
|
||||
proto.RegisterEnum("moc.HighAvailabilityState", HighAvailabilityState_name, HighAvailabilityState_value)
|
||||
proto.RegisterEnum("moc.HealthState", HealthState_name, HealthState_value)
|
||||
proto.RegisterType((*Error)(nil), "moc.Error")
|
||||
proto.RegisterType((*ProvisionStatus)(nil), "moc.ProvisionStatus")
|
||||
proto.RegisterType((*Health)(nil), "moc.Health")
|
||||
proto.RegisterType((*Version)(nil), "moc.Version")
|
||||
proto.RegisterType((*Status)(nil), "moc.Status")
|
||||
proto.RegisterType((*Entity)(nil), "moc.Entity")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206) }
|
||||
|
||||
var fileDescriptor_555bd8c177793206 = []byte{
|
||||
// 632 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xdf, 0x6e, 0xda, 0x4a,
|
||||
0x10, 0xc6, 0x63, 0x43, 0x0c, 0x8c, 0x81, 0xec, 0x99, 0x93, 0x46, 0x5c, 0xa6, 0xa4, 0xad, 0x22,
|
||||
0x2e, 0x40, 0x4a, 0xdb, 0x54, 0xbd, 0x74, 0xe2, 0x4d, 0x62, 0x85, 0xd8, 0xc8, 0x76, 0x12, 0xa9,
|
||||
0x37, 0xc8, 0x38, 0x2e, 0x58, 0xc2, 0x2c, 0xb2, 0x0d, 0x52, 0x1e, 0xa0, 0xcf, 0xd1, 0xa7, 0xe9,
|
||||
0x7b, 0x55, 0xbb, 0x6b, 0xa7, 0xd0, 0xd0, 0x3b, 0xcf, 0xcc, 0xef, 0x9b, 0x3f, 0x9f, 0x2d, 0x43,
|
||||
0x33, 0x64, 0x49, 0xc2, 0x16, 0xfd, 0x65, 0xca, 0x72, 0x86, 0x95, 0x84, 0x85, 0xdd, 0xcf, 0xb0,
|
||||
0x4f, 0xd3, 0x94, 0xa5, 0xd8, 0x81, 0xda, 0x5d, 0x94, 0x65, 0xc1, 0x34, 0xea, 0x28, 0xc7, 0xca,
|
||||
0x69, 0xc3, 0x2d, 0x43, 0x44, 0xa8, 0x5e, 0xb2, 0xa7, 0xa8, 0xa3, 0x1e, 0x2b, 0xa7, 0xfb, 0xae,
|
||||
0x78, 0xee, 0xfe, 0x50, 0xe0, 0x60, 0x94, 0xb2, 0x75, 0x9c, 0xc5, 0x6c, 0xe1, 0xe5, 0x41, 0xbe,
|
||||
0xca, 0xf0, 0x0b, 0x34, 0xc3, 0x55, 0x9a, 0x46, 0x8b, 0x9c, 0x27, 0x64, 0x9b, 0xf6, 0xd9, 0xff,
|
||||
0xfd, 0x84, 0x85, 0xfd, 0x2d, 0x36, 0x72, 0xb7, 0x40, 0xfc, 0x0a, 0xad, 0x65, 0x1a, 0xad, 0x63,
|
||||
0xb6, 0xca, 0xa4, 0x52, 0xfd, 0xb7, 0x72, 0x9b, 0xec, 0xae, 0x41, 0xbb, 0x89, 0x82, 0x79, 0x3e,
|
||||
0xc3, 0x4f, 0x3b, 0xa7, 0x13, 0xd1, 0x43, 0x22, 0xbb, 0x46, 0x9f, 0xef, 0x1e, 0xfd, 0x5a, 0xf6,
|
||||
0xd7, 0xdc, 0xb7, 0x50, 0x7b, 0x88, 0x52, 0xbe, 0x16, 0x1e, 0x81, 0xb6, 0x58, 0x25, 0x93, 0x28,
|
||||
0x2d, 0x7c, 0x2b, 0xa2, 0xee, 0x2f, 0x05, 0xb4, 0xc2, 0x99, 0x13, 0xd0, 0x66, 0xa2, 0x97, 0x40,
|
||||
0xf4, 0x33, 0x7d, 0xa3, 0xbd, 0x5b, 0x94, 0xd0, 0x04, 0x5c, 0x96, 0xb7, 0xc6, 0x8b, 0xa9, 0x94,
|
||||
0x8a, 0x7d, 0xf4, 0xb3, 0xc3, 0xd7, 0x56, 0xac, 0x32, 0x77, 0x07, 0x8f, 0xa7, 0xd0, 0x98, 0x07,
|
||||
0x59, 0x2e, 0xde, 0x69, 0xa7, 0x22, 0xc4, 0x20, 0xc4, 0x22, 0xe3, 0xfe, 0x29, 0xe2, 0x07, 0xa8,
|
||||
0xad, 0xe5, 0x09, 0x9d, 0xaa, 0xe0, 0x9a, 0x82, 0x2b, 0xce, 0x72, 0xcb, 0x62, 0xb7, 0x0f, 0x1a,
|
||||
0x5d, 0xe4, 0x71, 0xfe, 0x8c, 0xef, 0xa0, 0x65, 0x65, 0xa3, 0x79, 0x10, 0x46, 0x33, 0x36, 0x7f,
|
||||
0x2a, 0x0e, 0xae, 0xbb, 0xdb, 0xc9, 0xde, 0x39, 0x34, 0x9c, 0x65, 0x94, 0x06, 0x39, 0x37, 0xa7,
|
||||
0x06, 0x95, 0x6b, 0xea, 0x93, 0x3d, 0xac, 0x43, 0x75, 0xe4, 0x78, 0x3e, 0x51, 0x10, 0x40, 0x33,
|
||||
0xe9, 0x90, 0xfa, 0x94, 0xa8, 0xfc, 0xf9, 0x7e, 0x64, 0x1a, 0x3e, 0x25, 0x95, 0xde, 0x4f, 0x15,
|
||||
0xda, 0xdb, 0x2f, 0x1b, 0x75, 0xa8, 0xdd, 0xdb, 0xb7, 0xb6, 0xf3, 0x68, 0x93, 0x3d, 0x6c, 0x42,
|
||||
0xfd, 0xd2, 0xa5, 0x86, 0x6f, 0xd9, 0xd7, 0x44, 0xe1, 0x25, 0x11, 0x51, 0x93, 0xa8, 0xf8, 0x1f,
|
||||
0xb4, 0x64, 0x30, 0xbe, 0x32, 0xac, 0x21, 0x35, 0x49, 0x85, 0xd3, 0x62, 0x0a, 0xa7, 0xab, 0x1c,
|
||||
0x90, 0x33, 0x4b, 0x60, 0x9f, 0x37, 0x90, 0x29, 0x93, 0x68, 0x9c, 0x16, 0x7b, 0x70, 0xba, 0xc6,
|
||||
0x69, 0xb9, 0x55, 0x49, 0xd7, 0xc5, 0x26, 0x22, 0x65, 0x92, 0x06, 0x12, 0x68, 0x8e, 0x5c, 0xe7,
|
||||
0xc1, 0xf2, 0x2c, 0xc7, 0xe6, 0x0a, 0xc0, 0x03, 0xd0, 0x5f, 0x32, 0xd4, 0x24, 0x3a, 0x1e, 0x02,
|
||||
0x79, 0x49, 0x94, 0x5d, 0x9a, 0x88, 0xd0, 0x36, 0xe9, 0x96, 0xb4, 0x25, 0x57, 0xdb, 0x14, 0xb7,
|
||||
0xf1, 0x08, 0x70, 0x23, 0x55, 0xca, 0x0f, 0x7a, 0x57, 0xf0, 0xe6, 0x26, 0x9e, 0xce, 0x8c, 0x75,
|
||||
0x10, 0xcf, 0x83, 0x49, 0x3c, 0x8f, 0xf3, 0x67, 0xe9, 0xd3, 0x21, 0x90, 0xc2, 0xa7, 0xf1, 0x8d,
|
||||
0x31, 0xf6, 0x7c, 0x6e, 0xe8, 0x1e, 0x37, 0xd7, 0xf3, 0x8d, 0x8b, 0x21, 0x95, 0x76, 0x8d, 0xa8,
|
||||
0x6d, 0xf2, 0x91, 0x6a, 0x6f, 0x0a, 0xfa, 0xc6, 0xa7, 0xcd, 0x8f, 0xb7, 0x1d, 0xbf, 0xb4, 0x59,
|
||||
0x03, 0xd5, 0xb9, 0x95, 0x8a, 0x47, 0xc3, 0x15, 0x4b, 0xaa, 0xd2, 0x7b, 0xcb, 0xb7, 0x2e, 0x8d,
|
||||
0x21, 0xa9, 0xf0, 0xd2, 0x9d, 0xe5, 0x79, 0xd2, 0x5a, 0x61, 0xf4, 0xb5, 0x6b, 0x98, 0xc2, 0x55,
|
||||
0xd9, 0xeb, 0xca, 0xb9, 0xb7, 0x4d, 0xa2, 0x5d, 0xbc, 0xff, 0x76, 0x32, 0x8d, 0xf3, 0xd9, 0x6a,
|
||||
0xd2, 0x0f, 0x59, 0x32, 0x48, 0xe2, 0x30, 0x65, 0x19, 0xfb, 0x9e, 0x0f, 0x12, 0x16, 0x0e, 0xd2,
|
||||
0x65, 0x38, 0x90, 0xbf, 0xa3, 0x89, 0x26, 0xfe, 0x47, 0x1f, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff,
|
||||
0x08, 0xba, 0x90, 0x46, 0x9f, 0x04, 0x00, 0x00,
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/common";
|
||||
|
||||
package moc;
|
||||
|
||||
enum Operation {
|
||||
GET = 0;
|
||||
POST = 1;
|
||||
DELETE = 2;
|
||||
UPDATE = 3;
|
||||
}
|
||||
|
||||
enum ProvisionState {
|
||||
UNKNOWN = 0;
|
||||
CREATING = 1;
|
||||
CREATED = 2;
|
||||
CREATE_FAILED = 3;
|
||||
DELETING = 4;
|
||||
DELETE_FAILED = 5;
|
||||
DELETED = 6;
|
||||
UPDATING = 7;
|
||||
UPDATE_FAILED = 8;
|
||||
UPDATED = 9;
|
||||
PROVISIONING = 10;
|
||||
PROVISIONED = 11;
|
||||
PROVISION_FAILED = 12;
|
||||
DEPROVISIONING = 13;
|
||||
DEPROVISIONED = 14;
|
||||
DEPROVISION_FAILED = 15;
|
||||
}
|
||||
|
||||
enum HighAvailabilityState {
|
||||
UNKNOWN_HA_STATE = 0;
|
||||
STABLE = 1;
|
||||
PENDING = 2;
|
||||
}
|
||||
|
||||
enum HealthState {
|
||||
NOTKNOWN = 0;
|
||||
OK = 1;
|
||||
WARNING = 2;
|
||||
CRITICAL = 3;
|
||||
// The entity went missing from the platform
|
||||
MISSING = 4;
|
||||
DEGRADED = 5;
|
||||
// The entity went missing from the agent
|
||||
NOTFOUND = 6;
|
||||
}
|
||||
|
||||
message Error {
|
||||
string Message = 1;
|
||||
int32 Code = 2;
|
||||
}
|
||||
|
||||
message ProvisionStatus {
|
||||
ProvisionState currentState = 1;
|
||||
ProvisionState previousState = 2;
|
||||
}
|
||||
|
||||
message Health {
|
||||
HealthState currentState = 1;
|
||||
HealthState previousState = 2;
|
||||
}
|
||||
|
||||
message Version {
|
||||
string number = 1;
|
||||
}
|
||||
|
||||
message Status {
|
||||
Health health = 1;
|
||||
ProvisionStatus provisioningStatus = 2;
|
||||
Error lastError = 3;
|
||||
Version version = 4;
|
||||
}
|
||||
|
||||
message Entity {
|
||||
bool IsPlaceholder = 1; // On a multi-node system, the entity (such as a VM) is created on a node where
|
||||
// IsPlacehoder is false. On all the other nodes, IsPlaceholder is set to true.
|
||||
// When an entity moves among these nodes (such as when a VM migrates), the
|
||||
// IsPlacehoder property is updated accordingly on all the nodes.
|
||||
// IsPlacehoder therefore defines where the entity (VM) is *not* located.
|
||||
// This property is the exact inverse of the node agent's SystemOwned property.
|
||||
}
|
|
@ -0,0 +1,304 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: computecommon.proto
|
||||
|
||||
package common
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type UserType int32
|
||||
|
||||
const (
|
||||
UserType_ROOT UserType = 0
|
||||
UserType_USER UserType = 1
|
||||
)
|
||||
|
||||
var UserType_name = map[int32]string{
|
||||
0: "ROOT",
|
||||
1: "USER",
|
||||
}
|
||||
|
||||
var UserType_value = map[string]int32{
|
||||
"ROOT": 0,
|
||||
"USER": 1,
|
||||
}
|
||||
|
||||
func (x UserType) String() string {
|
||||
return proto.EnumName(UserType_name, int32(x))
|
||||
}
|
||||
|
||||
func (UserType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f09f9f48a46aad09, []int{0}
|
||||
}
|
||||
|
||||
type ProcessorType int32
|
||||
|
||||
const (
|
||||
ProcessorType_None ProcessorType = 0
|
||||
ProcessorType_Intel ProcessorType = 1
|
||||
ProcessorType_Intel64 ProcessorType = 2
|
||||
ProcessorType_AMD ProcessorType = 3
|
||||
ProcessorType_AMD64 ProcessorType = 4
|
||||
ProcessorType_ARM ProcessorType = 5
|
||||
ProcessorType_ARM64 ProcessorType = 6
|
||||
)
|
||||
|
||||
var ProcessorType_name = map[int32]string{
|
||||
0: "None",
|
||||
1: "Intel",
|
||||
2: "Intel64",
|
||||
3: "AMD",
|
||||
4: "AMD64",
|
||||
5: "ARM",
|
||||
6: "ARM64",
|
||||
}
|
||||
|
||||
var ProcessorType_value = map[string]int32{
|
||||
"None": 0,
|
||||
"Intel": 1,
|
||||
"Intel64": 2,
|
||||
"AMD": 3,
|
||||
"AMD64": 4,
|
||||
"ARM": 5,
|
||||
"ARM64": 6,
|
||||
}
|
||||
|
||||
func (x ProcessorType) String() string {
|
||||
return proto.EnumName(ProcessorType_name, int32(x))
|
||||
}
|
||||
|
||||
func (ProcessorType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f09f9f48a46aad09, []int{1}
|
||||
}
|
||||
|
||||
type OperatingSystemType int32
|
||||
|
||||
const (
|
||||
OperatingSystemType_WINDOWS OperatingSystemType = 0
|
||||
OperatingSystemType_LINUX OperatingSystemType = 1
|
||||
)
|
||||
|
||||
var OperatingSystemType_name = map[int32]string{
|
||||
0: "WINDOWS",
|
||||
1: "LINUX",
|
||||
}
|
||||
|
||||
var OperatingSystemType_value = map[string]int32{
|
||||
"WINDOWS": 0,
|
||||
"LINUX": 1,
|
||||
}
|
||||
|
||||
func (x OperatingSystemType) String() string {
|
||||
return proto.EnumName(OperatingSystemType_name, int32(x))
|
||||
}
|
||||
|
||||
func (OperatingSystemType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f09f9f48a46aad09, []int{2}
|
||||
}
|
||||
|
||||
type VirtualMachineSizeType int32
|
||||
|
||||
const (
|
||||
VirtualMachineSizeType_Default VirtualMachineSizeType = 0
|
||||
VirtualMachineSizeType_Standard_A2_v2 VirtualMachineSizeType = 2
|
||||
VirtualMachineSizeType_Standard_A4_v2 VirtualMachineSizeType = 3
|
||||
VirtualMachineSizeType_Standard_D2s_v3 VirtualMachineSizeType = 4
|
||||
VirtualMachineSizeType_Standard_D4s_v3 VirtualMachineSizeType = 5
|
||||
VirtualMachineSizeType_Standard_D8s_v3 VirtualMachineSizeType = 6
|
||||
VirtualMachineSizeType_Standard_D16s_v3 VirtualMachineSizeType = 7
|
||||
VirtualMachineSizeType_Standard_D32s_v3 VirtualMachineSizeType = 8
|
||||
VirtualMachineSizeType_Standard_DS2_v2 VirtualMachineSizeType = 9
|
||||
VirtualMachineSizeType_Standard_DS3_v2 VirtualMachineSizeType = 10
|
||||
VirtualMachineSizeType_Standard_DS4_v2 VirtualMachineSizeType = 11
|
||||
VirtualMachineSizeType_Standard_DS5_v2 VirtualMachineSizeType = 12
|
||||
VirtualMachineSizeType_Standard_DS13_v2 VirtualMachineSizeType = 13
|
||||
VirtualMachineSizeType_Standard_K8S_v1 VirtualMachineSizeType = 14
|
||||
VirtualMachineSizeType_Standard_K8S2_v1 VirtualMachineSizeType = 15
|
||||
VirtualMachineSizeType_Standard_K8S3_v1 VirtualMachineSizeType = 16
|
||||
VirtualMachineSizeType_Standard_K8S4_v1 VirtualMachineSizeType = 17
|
||||
VirtualMachineSizeType_Standard_NK6 VirtualMachineSizeType = 18
|
||||
VirtualMachineSizeType_Standard_NK12 VirtualMachineSizeType = 19
|
||||
VirtualMachineSizeType_Standard_NV6 VirtualMachineSizeType = 20
|
||||
VirtualMachineSizeType_Standard_NV12 VirtualMachineSizeType = 21
|
||||
VirtualMachineSizeType_Unsupported VirtualMachineSizeType = 99
|
||||
)
|
||||
|
||||
var VirtualMachineSizeType_name = map[int32]string{
|
||||
0: "Default",
|
||||
2: "Standard_A2_v2",
|
||||
3: "Standard_A4_v2",
|
||||
4: "Standard_D2s_v3",
|
||||
5: "Standard_D4s_v3",
|
||||
6: "Standard_D8s_v3",
|
||||
7: "Standard_D16s_v3",
|
||||
8: "Standard_D32s_v3",
|
||||
9: "Standard_DS2_v2",
|
||||
10: "Standard_DS3_v2",
|
||||
11: "Standard_DS4_v2",
|
||||
12: "Standard_DS5_v2",
|
||||
13: "Standard_DS13_v2",
|
||||
14: "Standard_K8S_v1",
|
||||
15: "Standard_K8S2_v1",
|
||||
16: "Standard_K8S3_v1",
|
||||
17: "Standard_K8S4_v1",
|
||||
18: "Standard_NK6",
|
||||
19: "Standard_NK12",
|
||||
20: "Standard_NV6",
|
||||
21: "Standard_NV12",
|
||||
99: "Unsupported",
|
||||
}
|
||||
|
||||
var VirtualMachineSizeType_value = map[string]int32{
|
||||
"Default": 0,
|
||||
"Standard_A2_v2": 2,
|
||||
"Standard_A4_v2": 3,
|
||||
"Standard_D2s_v3": 4,
|
||||
"Standard_D4s_v3": 5,
|
||||
"Standard_D8s_v3": 6,
|
||||
"Standard_D16s_v3": 7,
|
||||
"Standard_D32s_v3": 8,
|
||||
"Standard_DS2_v2": 9,
|
||||
"Standard_DS3_v2": 10,
|
||||
"Standard_DS4_v2": 11,
|
||||
"Standard_DS5_v2": 12,
|
||||
"Standard_DS13_v2": 13,
|
||||
"Standard_K8S_v1": 14,
|
||||
"Standard_K8S2_v1": 15,
|
||||
"Standard_K8S3_v1": 16,
|
||||
"Standard_K8S4_v1": 17,
|
||||
"Standard_NK6": 18,
|
||||
"Standard_NK12": 19,
|
||||
"Standard_NV6": 20,
|
||||
"Standard_NV12": 21,
|
||||
"Unsupported": 99,
|
||||
}
|
||||
|
||||
func (x VirtualMachineSizeType) String() string {
|
||||
return proto.EnumName(VirtualMachineSizeType_name, int32(x))
|
||||
}
|
||||
|
||||
func (VirtualMachineSizeType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f09f9f48a46aad09, []int{3}
|
||||
}
|
||||
|
||||
type PowerState int32
|
||||
|
||||
const (
|
||||
PowerState_Unknown PowerState = 0
|
||||
PowerState_Running PowerState = 1
|
||||
PowerState_Off PowerState = 2
|
||||
PowerState_Paused PowerState = 3
|
||||
PowerState_Critical PowerState = 4
|
||||
)
|
||||
|
||||
var PowerState_name = map[int32]string{
|
||||
0: "Unknown",
|
||||
1: "Running",
|
||||
2: "Off",
|
||||
3: "Paused",
|
||||
4: "Critical",
|
||||
}
|
||||
|
||||
var PowerState_value = map[string]int32{
|
||||
"Unknown": 0,
|
||||
"Running": 1,
|
||||
"Off": 2,
|
||||
"Paused": 3,
|
||||
"Critical": 4,
|
||||
}
|
||||
|
||||
func (x PowerState) String() string {
|
||||
return proto.EnumName(PowerState_name, int32(x))
|
||||
}
|
||||
|
||||
func (PowerState) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f09f9f48a46aad09, []int{4}
|
||||
}
|
||||
|
||||
type VirtualMachineOperation int32
|
||||
|
||||
const (
|
||||
VirtualMachineOperation_START VirtualMachineOperation = 0
|
||||
VirtualMachineOperation_STOP VirtualMachineOperation = 1
|
||||
VirtualMachineOperation_RESET VirtualMachineOperation = 2
|
||||
)
|
||||
|
||||
var VirtualMachineOperation_name = map[int32]string{
|
||||
0: "START",
|
||||
1: "STOP",
|
||||
2: "RESET",
|
||||
}
|
||||
|
||||
var VirtualMachineOperation_value = map[string]int32{
|
||||
"START": 0,
|
||||
"STOP": 1,
|
||||
"RESET": 2,
|
||||
}
|
||||
|
||||
func (x VirtualMachineOperation) String() string {
|
||||
return proto.EnumName(VirtualMachineOperation_name, int32(x))
|
||||
}
|
||||
|
||||
func (VirtualMachineOperation) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f09f9f48a46aad09, []int{5}
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.UserType", UserType_name, UserType_value)
|
||||
proto.RegisterEnum("moc.ProcessorType", ProcessorType_name, ProcessorType_value)
|
||||
proto.RegisterEnum("moc.OperatingSystemType", OperatingSystemType_name, OperatingSystemType_value)
|
||||
proto.RegisterEnum("moc.VirtualMachineSizeType", VirtualMachineSizeType_name, VirtualMachineSizeType_value)
|
||||
proto.RegisterEnum("moc.PowerState", PowerState_name, PowerState_value)
|
||||
proto.RegisterEnum("moc.VirtualMachineOperation", VirtualMachineOperation_name, VirtualMachineOperation_value)
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("computecommon.proto", fileDescriptor_f09f9f48a46aad09) }
|
||||
|
||||
var fileDescriptor_f09f9f48a46aad09 = []byte{
|
||||
// 492 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0xd3, 0x4f, 0x6f, 0xda, 0x30,
|
||||
0x18, 0x06, 0x70, 0x20, 0xfc, 0xeb, 0x0b, 0x94, 0xb7, 0xa6, 0xdb, 0x6e, 0xbb, 0x4c, 0xbb, 0x44,
|
||||
0x5a, 0x51, 0x20, 0x8b, 0xd8, 0x91, 0x0d, 0x0e, 0x88, 0x41, 0x50, 0x0c, 0x74, 0xdb, 0x05, 0xa5,
|
||||
0xc1, 0xd0, 0x68, 0xc4, 0x8e, 0x12, 0x87, 0xaa, 0xfb, 0x9c, 0xfb, 0x40, 0x93, 0x4d, 0xc7, 0x16,
|
||||
0x6e, 0xce, 0x4f, 0x8f, 0xfd, 0x5a, 0xca, 0x63, 0xe8, 0x04, 0x22, 0x8a, 0x33, 0xc9, 0x02, 0x11,
|
||||
0x45, 0x82, 0xdf, 0xc5, 0x89, 0x90, 0x82, 0x18, 0x91, 0x08, 0xcc, 0xb7, 0x50, 0x5f, 0xa5, 0x2c,
|
||||
0x59, 0x3e, 0xc7, 0x8c, 0xd4, 0xa1, 0xec, 0xb9, 0xee, 0x12, 0x0b, 0x6a, 0xb5, 0xa2, 0x63, 0x0f,
|
||||
0x8b, 0xe6, 0x77, 0x68, 0x2d, 0x12, 0x11, 0xb0, 0x34, 0x15, 0xe7, 0xd0, 0x5c, 0x70, 0x86, 0x05,
|
||||
0x72, 0x05, 0x95, 0x09, 0x97, 0xec, 0x80, 0x45, 0xd2, 0x80, 0x9a, 0x5e, 0x3a, 0x36, 0x96, 0x48,
|
||||
0x0d, 0x8c, 0xe1, 0x6c, 0x84, 0x86, 0x0a, 0x0c, 0x67, 0x23, 0xc7, 0xc6, 0xb2, 0x36, 0x6f, 0x86,
|
||||
0x15, 0x6d, 0xde, 0xcc, 0xb1, 0xb1, 0x6a, 0x7e, 0x80, 0x8e, 0x1b, 0xb3, 0xc4, 0x97, 0x21, 0xdf,
|
||||
0xd3, 0xe7, 0x54, 0xb2, 0x48, 0x0f, 0x68, 0x40, 0xed, 0x7e, 0x32, 0x1f, 0xb9, 0xf7, 0xf4, 0x34,
|
||||
0xe3, 0xeb, 0x64, 0xbe, 0xfa, 0x86, 0x45, 0xf3, 0xb7, 0x01, 0xaf, 0xd7, 0x61, 0x22, 0x33, 0xff,
|
||||
0x30, 0xf3, 0x83, 0xc7, 0x90, 0x33, 0x1a, 0xfe, 0x62, 0x7f, 0xb7, 0x8c, 0xd8, 0xce, 0xcf, 0x0e,
|
||||
0x12, 0x0b, 0x84, 0xc0, 0x35, 0x95, 0x3e, 0xdf, 0xfa, 0xc9, 0x76, 0x33, 0xec, 0x6d, 0x8e, 0x3d,
|
||||
0x2c, 0xe5, 0xcd, 0x56, 0x66, 0x90, 0x0e, 0xb4, 0xcf, 0x36, 0xea, 0xa5, 0x9b, 0x63, 0x1f, 0xcb,
|
||||
0x79, 0xb4, 0x35, 0x56, 0xf2, 0x38, 0xd0, 0x58, 0x25, 0xb7, 0x80, 0xff, 0xd0, 0x72, 0xb4, 0xd6,
|
||||
0xf2, 0xda, 0x3f, 0x9d, 0x5a, 0xcf, 0x1f, 0x40, 0xf5, 0x9d, 0xae, 0x2e, 0xb0, 0xaf, 0x10, 0x2e,
|
||||
0x50, 0xdf, 0xb4, 0x71, 0x81, 0x1f, 0x15, 0x36, 0xf3, 0x93, 0xa8, 0xa5, 0xf7, 0xb7, 0x72, 0xd1,
|
||||
0xe9, 0x80, 0x6e, 0x8e, 0x16, 0x5e, 0xe7, 0xa2, 0xd3, 0x81, 0x9a, 0x6f, 0x61, 0xfb, 0x52, 0xfb,
|
||||
0x4a, 0xf1, 0x52, 0x6d, 0xa5, 0x37, 0x04, 0xa1, 0x79, 0xd6, 0xf9, 0xd4, 0x41, 0x42, 0x6e, 0xa0,
|
||||
0xf5, 0x9f, 0x58, 0x3d, 0xec, 0xe4, 0x43, 0x6b, 0x07, 0x6f, 0xf3, 0xa1, 0xb5, 0xd5, 0xc3, 0x57,
|
||||
0xa4, 0x0d, 0x8d, 0x15, 0x4f, 0xb3, 0x38, 0x16, 0x89, 0x64, 0x5b, 0x0c, 0xcc, 0x09, 0xc0, 0x42,
|
||||
0x3c, 0xb1, 0x84, 0x4a, 0x5f, 0xea, 0x3f, 0xb9, 0xe2, 0x3f, 0xb9, 0x78, 0xe2, 0x58, 0x50, 0x1f,
|
||||
0x5e, 0xc6, 0x79, 0xc8, 0xf7, 0x58, 0x54, 0x0d, 0x72, 0x77, 0x3b, 0x2c, 0x11, 0x80, 0xea, 0xc2,
|
||||
0xcf, 0x52, 0xb6, 0x45, 0x83, 0x34, 0xa1, 0xfe, 0x25, 0x09, 0x65, 0x18, 0xf8, 0x07, 0x2c, 0x9b,
|
||||
0x9f, 0xe0, 0x4d, 0xbe, 0x20, 0x2f, 0xf5, 0x12, 0x5c, 0xf5, 0x88, 0x2e, 0x87, 0xde, 0x4b, 0xb7,
|
||||
0xe9, 0xd2, 0x5d, 0x60, 0x51, 0xa1, 0x37, 0xa6, 0xe3, 0x25, 0x96, 0x3e, 0xbf, 0xff, 0xf1, 0x6e,
|
||||
0x1f, 0xca, 0xc7, 0xec, 0xe1, 0x2e, 0x10, 0x51, 0x37, 0x0a, 0x83, 0x44, 0xa4, 0x62, 0x27, 0xbb,
|
||||
0x91, 0x08, 0xba, 0x49, 0x1c, 0x74, 0x4f, 0x0f, 0xe7, 0xa1, 0xaa, 0x5f, 0x4e, 0xff, 0x4f, 0x00,
|
||||
0x00, 0x00, 0xff, 0xff, 0x27, 0xf8, 0xfe, 0x8c, 0x50, 0x03, 0x00, 0x00,
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/common";
|
||||
|
||||
package moc;
|
||||
|
||||
enum UserType {
|
||||
ROOT = 0;
|
||||
USER = 1;
|
||||
}
|
||||
|
||||
enum ProcessorType {
|
||||
None = 0;
|
||||
Intel = 1;
|
||||
Intel64 = 2;
|
||||
AMD = 3;
|
||||
AMD64 = 4;
|
||||
ARM = 5;
|
||||
ARM64 = 6;
|
||||
}
|
||||
|
||||
|
||||
enum OperatingSystemType {
|
||||
WINDOWS = 0;
|
||||
LINUX = 1;
|
||||
}
|
||||
|
||||
enum VirtualMachineSizeType {
|
||||
Default = 0;
|
||||
Standard_A2_v2 = 2;
|
||||
Standard_A4_v2 = 3;
|
||||
Standard_D2s_v3 = 4;
|
||||
Standard_D4s_v3 = 5;
|
||||
Standard_D8s_v3 = 6;
|
||||
Standard_D16s_v3 = 7;
|
||||
Standard_D32s_v3 = 8;
|
||||
Standard_DS2_v2 = 9;
|
||||
Standard_DS3_v2 = 10;
|
||||
Standard_DS4_v2 = 11;
|
||||
Standard_DS5_v2 = 12;
|
||||
Standard_DS13_v2 = 13;
|
||||
Standard_K8S_v1 = 14;
|
||||
Standard_K8S2_v1 = 15;
|
||||
Standard_K8S3_v1 = 16;
|
||||
Standard_K8S4_v1 = 17;
|
||||
Standard_NK6 = 18;
|
||||
Standard_NK12 = 19;
|
||||
Standard_NV6 = 20;
|
||||
Standard_NV12 = 21;
|
||||
Unsupported = 99;
|
||||
}
|
||||
|
||||
enum PowerState {
|
||||
Unknown = 0;
|
||||
Running = 1 ;
|
||||
Off = 2;
|
||||
Paused = 3;
|
||||
Critical = 4;
|
||||
}
|
||||
|
||||
enum VirtualMachineOperation {
|
||||
START = 0;
|
||||
STOP = 1;
|
||||
RESET = 2;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,167 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: networkcommon.proto
|
||||
|
||||
package common
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Protocol int32
|
||||
|
||||
const (
|
||||
Protocol_All Protocol = 0
|
||||
Protocol_Tcp Protocol = 1
|
||||
Protocol_Udp Protocol = 2
|
||||
)
|
||||
|
||||
var Protocol_name = map[int32]string{
|
||||
0: "All",
|
||||
1: "Tcp",
|
||||
2: "Udp",
|
||||
}
|
||||
|
||||
var Protocol_value = map[string]int32{
|
||||
"All": 0,
|
||||
"Tcp": 1,
|
||||
"Udp": 2,
|
||||
}
|
||||
|
||||
func (x Protocol) String() string {
|
||||
return proto.EnumName(Protocol_name, int32(x))
|
||||
}
|
||||
|
||||
func (Protocol) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f3ca6485cdbe2768, []int{0}
|
||||
}
|
||||
|
||||
type IPAllocationMethod int32
|
||||
|
||||
const (
|
||||
IPAllocationMethod_Invalid IPAllocationMethod = 0
|
||||
IPAllocationMethod_Dynamic IPAllocationMethod = 1
|
||||
IPAllocationMethod_Static IPAllocationMethod = 2
|
||||
)
|
||||
|
||||
var IPAllocationMethod_name = map[int32]string{
|
||||
0: "Invalid",
|
||||
1: "Dynamic",
|
||||
2: "Static",
|
||||
}
|
||||
|
||||
var IPAllocationMethod_value = map[string]int32{
|
||||
"Invalid": 0,
|
||||
"Dynamic": 1,
|
||||
"Static": 2,
|
||||
}
|
||||
|
||||
func (x IPAllocationMethod) String() string {
|
||||
return proto.EnumName(IPAllocationMethod_name, int32(x))
|
||||
}
|
||||
|
||||
func (IPAllocationMethod) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f3ca6485cdbe2768, []int{1}
|
||||
}
|
||||
|
||||
type Dns struct {
|
||||
Servers []string `protobuf:"bytes,1,rep,name=servers,proto3" json:"servers,omitempty"`
|
||||
Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
|
||||
Search []string `protobuf:"bytes,3,rep,name=search,proto3" json:"search,omitempty"`
|
||||
Options []string `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Dns) Reset() { *m = Dns{} }
|
||||
func (m *Dns) String() string { return proto.CompactTextString(m) }
|
||||
func (*Dns) ProtoMessage() {}
|
||||
func (*Dns) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_f3ca6485cdbe2768, []int{0}
|
||||
}
|
||||
|
||||
func (m *Dns) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Dns.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Dns) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Dns.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Dns) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Dns.Merge(m, src)
|
||||
}
|
||||
func (m *Dns) XXX_Size() int {
|
||||
return xxx_messageInfo_Dns.Size(m)
|
||||
}
|
||||
func (m *Dns) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Dns.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Dns proto.InternalMessageInfo
|
||||
|
||||
func (m *Dns) GetServers() []string {
|
||||
if m != nil {
|
||||
return m.Servers
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Dns) GetDomain() string {
|
||||
if m != nil {
|
||||
return m.Domain
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Dns) GetSearch() []string {
|
||||
if m != nil {
|
||||
return m.Search
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Dns) GetOptions() []string {
|
||||
if m != nil {
|
||||
return m.Options
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.Protocol", Protocol_name, Protocol_value)
|
||||
proto.RegisterEnum("moc.IPAllocationMethod", IPAllocationMethod_name, IPAllocationMethod_value)
|
||||
proto.RegisterType((*Dns)(nil), "moc.Dns")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("networkcommon.proto", fileDescriptor_f3ca6485cdbe2768) }
|
||||
|
||||
var fileDescriptor_f3ca6485cdbe2768 = []byte{
|
||||
// 237 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0x90, 0x41, 0x4b, 0x03, 0x31,
|
||||
0x10, 0x85, 0xbb, 0x1b, 0xd9, 0xb5, 0xe3, 0x25, 0x44, 0x90, 0x1c, 0x8b, 0x52, 0x28, 0x3d, 0x74,
|
||||
0x0f, 0xde, 0xbc, 0x55, 0x7a, 0xe9, 0x41, 0x28, 0x55, 0x2f, 0xde, 0xd2, 0xd9, 0xe8, 0x06, 0x93,
|
||||
0x4c, 0x48, 0x62, 0xc5, 0x7f, 0x2f, 0x69, 0xb7, 0xb7, 0xf7, 0x0d, 0xbc, 0x6f, 0x98, 0x81, 0x5b,
|
||||
0xaf, 0xf3, 0x2f, 0xc5, 0x6f, 0x24, 0xe7, 0xc8, 0xaf, 0x42, 0xa4, 0x4c, 0x82, 0x39, 0xc2, 0x7b,
|
||||
0x03, 0x6c, 0xe3, 0x93, 0x90, 0xd0, 0x26, 0x1d, 0x8f, 0x3a, 0x26, 0x59, 0xcd, 0xd8, 0x62, 0xba,
|
||||
0xbf, 0xa0, 0xb8, 0x83, 0xa6, 0x27, 0xa7, 0x8c, 0x97, 0xf5, 0xac, 0x5a, 0x4c, 0xf7, 0x23, 0x95,
|
||||
0x79, 0xd2, 0x2a, 0xe2, 0x20, 0xd9, 0xa9, 0x30, 0x52, 0x31, 0x51, 0xc8, 0x86, 0x7c, 0x92, 0x57,
|
||||
0x67, 0xd3, 0x88, 0xcb, 0x39, 0x5c, 0xef, 0xca, 0x62, 0x24, 0x2b, 0x5a, 0x60, 0x6b, 0x6b, 0xf9,
|
||||
0xa4, 0x84, 0x37, 0x0c, 0xbc, 0x2a, 0xe1, 0xbd, 0x0f, 0xbc, 0x5e, 0x3e, 0x81, 0xd8, 0xee, 0xd6,
|
||||
0xd6, 0x12, 0xaa, 0xd2, 0x7b, 0xd1, 0x79, 0xa0, 0x5e, 0xdc, 0x40, 0xbb, 0xf5, 0x47, 0x65, 0x4d,
|
||||
0xcf, 0x27, 0x05, 0x36, 0x7f, 0x5e, 0x39, 0x83, 0xbc, 0x12, 0x00, 0xcd, 0x6b, 0x56, 0xd9, 0x20,
|
||||
0xaf, 0x9f, 0xe7, 0x1f, 0x0f, 0x5f, 0x26, 0x0f, 0x3f, 0x87, 0x15, 0x92, 0xeb, 0x9c, 0xc1, 0x48,
|
||||
0x89, 0x3e, 0x73, 0xe7, 0x08, 0xbb, 0x18, 0xb0, 0x3b, 0xdf, 0x7f, 0x68, 0x4e, 0x0f, 0x78, 0xfc,
|
||||
0x0f, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x00, 0xf0, 0x8a, 0x17, 0x01, 0x00, 0x00,
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/common";
|
||||
package moc;
|
||||
|
||||
message Dns {
|
||||
repeated string servers = 1;
|
||||
string domain = 2;
|
||||
repeated string search = 3;
|
||||
repeated string options = 4;
|
||||
}
|
||||
|
||||
enum Protocol {
|
||||
All = 0;
|
||||
Tcp = 1;
|
||||
Udp = 2;
|
||||
}
|
||||
|
||||
enum IPAllocationMethod {
|
||||
Invalid = 0;
|
||||
Dynamic = 1;
|
||||
Static = 2;
|
||||
}
|
|
@ -0,0 +1,371 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: nodeinfo.proto
|
||||
|
||||
package common
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Processor struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Cores uint32 `protobuf:"varint,2,opt,name=cores,proto3" json:"cores,omitempty"`
|
||||
Speed string `protobuf:"bytes,3,opt,name=speed,proto3" json:"speed,omitempty"`
|
||||
Type ProcessorType `protobuf:"varint,4,opt,name=type,proto3,enum=moc.ProcessorType" json:"type,omitempty"`
|
||||
Virtualization bool `protobuf:"varint,5,opt,name=virtualization,proto3" json:"virtualization,omitempty"`
|
||||
Logicalprocessors uint32 `protobuf:"varint,6,opt,name=logicalprocessors,proto3" json:"logicalprocessors,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Processor) Reset() { *m = Processor{} }
|
||||
func (m *Processor) String() string { return proto.CompactTextString(m) }
|
||||
func (*Processor) ProtoMessage() {}
|
||||
func (*Processor) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5ce10b90ec3125ff, []int{0}
|
||||
}
|
||||
|
||||
func (m *Processor) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Processor.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Processor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Processor.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Processor) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Processor.Merge(m, src)
|
||||
}
|
||||
func (m *Processor) XXX_Size() int {
|
||||
return xxx_messageInfo_Processor.Size(m)
|
||||
}
|
||||
func (m *Processor) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Processor.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Processor proto.InternalMessageInfo
|
||||
|
||||
func (m *Processor) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Processor) GetCores() uint32 {
|
||||
if m != nil {
|
||||
return m.Cores
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Processor) GetSpeed() string {
|
||||
if m != nil {
|
||||
return m.Speed
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Processor) GetType() ProcessorType {
|
||||
if m != nil {
|
||||
return m.Type
|
||||
}
|
||||
return ProcessorType_None
|
||||
}
|
||||
|
||||
func (m *Processor) GetVirtualization() bool {
|
||||
if m != nil {
|
||||
return m.Virtualization
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *Processor) GetLogicalprocessors() uint32 {
|
||||
if m != nil {
|
||||
return m.Logicalprocessors
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type PhysicalMemory struct {
|
||||
SizeBytes uint64 `protobuf:"varint,1,opt,name=sizeBytes,proto3" json:"sizeBytes,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PhysicalMemory) Reset() { *m = PhysicalMemory{} }
|
||||
func (m *PhysicalMemory) String() string { return proto.CompactTextString(m) }
|
||||
func (*PhysicalMemory) ProtoMessage() {}
|
||||
func (*PhysicalMemory) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5ce10b90ec3125ff, []int{1}
|
||||
}
|
||||
|
||||
func (m *PhysicalMemory) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PhysicalMemory.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PhysicalMemory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PhysicalMemory.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *PhysicalMemory) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PhysicalMemory.Merge(m, src)
|
||||
}
|
||||
func (m *PhysicalMemory) XXX_Size() int {
|
||||
return xxx_messageInfo_PhysicalMemory.Size(m)
|
||||
}
|
||||
func (m *PhysicalMemory) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PhysicalMemory.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PhysicalMemory proto.InternalMessageInfo
|
||||
|
||||
func (m *PhysicalMemory) GetSizeBytes() uint64 {
|
||||
if m != nil {
|
||||
return m.SizeBytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GPU struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
SizeBytes uint32 `protobuf:"varint,2,opt,name=sizeBytes,proto3" json:"sizeBytes,omitempty"`
|
||||
Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GPU) Reset() { *m = GPU{} }
|
||||
func (m *GPU) String() string { return proto.CompactTextString(m) }
|
||||
func (*GPU) ProtoMessage() {}
|
||||
func (*GPU) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5ce10b90ec3125ff, []int{2}
|
||||
}
|
||||
|
||||
func (m *GPU) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GPU.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GPU) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GPU.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *GPU) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GPU.Merge(m, src)
|
||||
}
|
||||
func (m *GPU) XXX_Size() int {
|
||||
return xxx_messageInfo_GPU.Size(m)
|
||||
}
|
||||
func (m *GPU) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GPU.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GPU proto.InternalMessageInfo
|
||||
|
||||
func (m *GPU) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GPU) GetSizeBytes() uint32 {
|
||||
if m != nil {
|
||||
return m.SizeBytes
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *GPU) GetCount() uint32 {
|
||||
if m != nil {
|
||||
return m.Count
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type NodeInfo struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Capability *Resources `protobuf:"bytes,3,opt,name=capability,proto3" json:"capability,omitempty"`
|
||||
Availability *Resources `protobuf:"bytes,4,opt,name=availability,proto3" json:"availability,omitempty"`
|
||||
Ostype OperatingSystemType `protobuf:"varint,6,opt,name=ostype,proto3,enum=moc.OperatingSystemType" json:"ostype,omitempty"`
|
||||
Status *Status `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NodeInfo) Reset() { *m = NodeInfo{} }
|
||||
func (m *NodeInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodeInfo) ProtoMessage() {}
|
||||
func (*NodeInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5ce10b90ec3125ff, []int{3}
|
||||
}
|
||||
|
||||
func (m *NodeInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NodeInfo.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NodeInfo.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NodeInfo) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NodeInfo.Merge(m, src)
|
||||
}
|
||||
func (m *NodeInfo) XXX_Size() int {
|
||||
return xxx_messageInfo_NodeInfo.Size(m)
|
||||
}
|
||||
func (m *NodeInfo) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NodeInfo.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NodeInfo proto.InternalMessageInfo
|
||||
|
||||
func (m *NodeInfo) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NodeInfo) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *NodeInfo) GetCapability() *Resources {
|
||||
if m != nil {
|
||||
return m.Capability
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NodeInfo) GetAvailability() *Resources {
|
||||
if m != nil {
|
||||
return m.Availability
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NodeInfo) GetOstype() OperatingSystemType {
|
||||
if m != nil {
|
||||
return m.Ostype
|
||||
}
|
||||
return OperatingSystemType_WINDOWS
|
||||
}
|
||||
|
||||
func (m *NodeInfo) GetStatus() *Status {
|
||||
if m != nil {
|
||||
return m.Status
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Resources struct {
|
||||
Processor *Processor `protobuf:"bytes,1,opt,name=processor,proto3" json:"processor,omitempty"`
|
||||
Memory *PhysicalMemory `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory,omitempty"`
|
||||
Gpu *GPU `protobuf:"bytes,3,opt,name=gpu,proto3" json:"gpu,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Resources) Reset() { *m = Resources{} }
|
||||
func (m *Resources) String() string { return proto.CompactTextString(m) }
|
||||
func (*Resources) ProtoMessage() {}
|
||||
func (*Resources) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_5ce10b90ec3125ff, []int{4}
|
||||
}
|
||||
|
||||
func (m *Resources) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Resources.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Resources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Resources.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Resources) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Resources.Merge(m, src)
|
||||
}
|
||||
func (m *Resources) XXX_Size() int {
|
||||
return xxx_messageInfo_Resources.Size(m)
|
||||
}
|
||||
func (m *Resources) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Resources.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Resources proto.InternalMessageInfo
|
||||
|
||||
func (m *Resources) GetProcessor() *Processor {
|
||||
if m != nil {
|
||||
return m.Processor
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Resources) GetMemory() *PhysicalMemory {
|
||||
if m != nil {
|
||||
return m.Memory
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Resources) GetGpu() *GPU {
|
||||
if m != nil {
|
||||
return m.Gpu
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Processor)(nil), "moc.common.Processor")
|
||||
proto.RegisterType((*PhysicalMemory)(nil), "moc.common.PhysicalMemory")
|
||||
proto.RegisterType((*GPU)(nil), "moc.common.GPU")
|
||||
proto.RegisterType((*NodeInfo)(nil), "moc.common.NodeInfo")
|
||||
proto.RegisterType((*Resources)(nil), "moc.common.Resources")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("nodeinfo.proto", fileDescriptor_5ce10b90ec3125ff) }
|
||||
|
||||
var fileDescriptor_5ce10b90ec3125ff = []byte{
|
||||
// 460 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xcd, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0x96, 0x93, 0xd4, 0xd4, 0x93, 0x12, 0xc4, 0x02, 0x92, 0x15, 0x71, 0x08, 0xae, 0xa8, 0x72,
|
||||
0x40, 0x0e, 0x4a, 0xc5, 0x81, 0x6b, 0x2f, 0x15, 0x87, 0x42, 0xb4, 0xa5, 0x17, 0x6e, 0x9b, 0xf5,
|
||||
0x26, 0x5d, 0xc9, 0xeb, 0x59, 0xed, 0xae, 0x2b, 0xb9, 0x2f, 0xc2, 0x33, 0xf1, 0x44, 0x5c, 0x91,
|
||||
0xc7, 0x69, 0x7e, 0x4a, 0xd5, 0x93, 0xbd, 0xdf, 0xcf, 0xec, 0xcc, 0x7c, 0x36, 0x8c, 0x2a, 0x2c,
|
||||
0x94, 0xae, 0x56, 0x98, 0x5b, 0x87, 0x01, 0x19, 0x18, 0x94, 0xb9, 0x44, 0x63, 0xb0, 0x1a, 0x9f,
|
||||
0x74, 0xcf, 0x8e, 0x19, 0xbf, 0x91, 0x68, 0x6c, 0x1d, 0xd4, 0x3e, 0x98, 0xfd, 0x89, 0x20, 0x59,
|
||||
0x38, 0x94, 0xca, 0x7b, 0x74, 0x8c, 0xc1, 0xa0, 0x12, 0x46, 0xa5, 0xd1, 0x24, 0x9a, 0x26, 0x9c,
|
||||
0xde, 0xd9, 0x5b, 0x38, 0x92, 0xe8, 0x94, 0x4f, 0x7b, 0x93, 0x68, 0xfa, 0x92, 0x77, 0x87, 0x16,
|
||||
0xf5, 0x56, 0xa9, 0x22, 0xed, 0x93, 0xb4, 0x3b, 0xb0, 0x33, 0x18, 0x84, 0xc6, 0xaa, 0x74, 0x30,
|
||||
0x89, 0xa6, 0xa3, 0x39, 0xcb, 0xdb, 0x5e, 0xb6, 0xd5, 0x7f, 0x36, 0x56, 0x71, 0xe2, 0xd9, 0x19,
|
||||
0x8c, 0xee, 0xb4, 0x0b, 0xb5, 0x28, 0xf5, 0xbd, 0x08, 0x1a, 0xab, 0xf4, 0x68, 0x12, 0x4d, 0x8f,
|
||||
0xf9, 0x23, 0x94, 0x7d, 0x82, 0xd7, 0x25, 0xae, 0xb5, 0x14, 0xa5, 0x7d, 0xa8, 0xe2, 0xd3, 0x98,
|
||||
0xfa, 0xf8, 0x9f, 0xc8, 0x72, 0x18, 0x2d, 0x6e, 0x1b, 0xdf, 0xa2, 0x57, 0xca, 0xa0, 0x6b, 0xd8,
|
||||
0x7b, 0x48, 0xbc, 0xbe, 0x57, 0x17, 0x4d, 0x50, 0x9e, 0x86, 0x1a, 0xf0, 0x1d, 0x90, 0x5d, 0x41,
|
||||
0xff, 0x72, 0x71, 0xf3, 0xe4, 0xd0, 0x07, 0xc6, 0x6e, 0xf0, 0x1d, 0xd0, 0xad, 0xa4, 0xae, 0x02,
|
||||
0x0d, 0x4f, 0x2b, 0xa9, 0xab, 0x90, 0xfd, 0x8d, 0xe0, 0xf8, 0x3b, 0x16, 0xea, 0x5b, 0xb5, 0xc2,
|
||||
0x27, 0x8b, 0x8e, 0xa0, 0xa7, 0x0b, 0xaa, 0x96, 0xf0, 0x9e, 0x2e, 0xd8, 0x17, 0x00, 0x29, 0xac,
|
||||
0x58, 0xea, 0x52, 0x87, 0x86, 0x6a, 0x0d, 0xe7, 0xef, 0xf2, 0x5d, 0x7e, 0x39, 0x57, 0x1e, 0x6b,
|
||||
0x27, 0x95, 0xe7, 0x7b, 0x42, 0xf6, 0x15, 0x4e, 0xc4, 0x9d, 0xd0, 0xe5, 0x83, 0x71, 0xf0, 0x9c,
|
||||
0xf1, 0x40, 0xca, 0x3e, 0x43, 0x8c, 0x9e, 0x12, 0x8a, 0x29, 0xa1, 0x94, 0x4c, 0x3f, 0xac, 0x72,
|
||||
0x22, 0xe8, 0x6a, 0x7d, 0xdd, 0xf8, 0xa0, 0x0c, 0xe5, 0xb4, 0xd1, 0xb1, 0x53, 0x88, 0x7d, 0x10,
|
||||
0xa1, 0xf6, 0xe9, 0x0b, 0xba, 0x66, 0x48, 0x8e, 0x6b, 0x82, 0xf8, 0x86, 0xca, 0x7e, 0x47, 0x90,
|
||||
0x6c, 0xaf, 0x64, 0xe7, 0x90, 0x6c, 0x43, 0xa1, 0xf9, 0x1f, 0x35, 0xb7, 0xfd, 0x20, 0xf8, 0x4e,
|
||||
0xc7, 0xe6, 0x10, 0x1b, 0xca, 0x8c, 0xf6, 0x33, 0x9c, 0x8f, 0x0f, 0x1c, 0x07, 0xa9, 0xf2, 0x8d,
|
||||
0x92, 0x7d, 0x80, 0xfe, 0xda, 0xd6, 0x9b, 0xc5, 0xbd, 0xda, 0x37, 0x5c, 0x2e, 0x6e, 0x78, 0xcb,
|
||||
0x5d, 0x7c, 0xfc, 0x75, 0xba, 0xd6, 0xe1, 0xb6, 0x5e, 0xb6, 0xcc, 0xcc, 0x68, 0xe9, 0xd0, 0xe3,
|
||||
0x2a, 0xcc, 0x0c, 0xca, 0x99, 0xb3, 0x72, 0xd6, 0xe9, 0x97, 0x31, 0xfd, 0x0c, 0xe7, 0xff, 0x02,
|
||||
0x00, 0x00, 0xff, 0xff, 0xae, 0x3b, 0x2b, 0x57, 0x4d, 0x03, 0x00, 0x00,
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/common";
|
||||
package moc.common;
|
||||
|
||||
import "common.proto";
|
||||
import "computecommon.proto";
|
||||
|
||||
message Processor {
|
||||
string name = 1;
|
||||
uint32 cores = 2;
|
||||
string speed = 3;
|
||||
ProcessorType type = 4;
|
||||
bool virtualization = 5;
|
||||
uint32 logicalprocessors = 6;
|
||||
}
|
||||
|
||||
message PhysicalMemory {
|
||||
uint64 sizeBytes = 1;
|
||||
}
|
||||
|
||||
message GPU {
|
||||
string name = 1;
|
||||
uint32 sizeBytes = 2;
|
||||
uint32 count = 3;
|
||||
}
|
||||
|
||||
message NodeInfo {
|
||||
string name = 1;
|
||||
string id = 2;
|
||||
Resources capability = 3;
|
||||
Resources availability = 4;
|
||||
OperatingSystemType ostype = 6;
|
||||
Status status = 7;
|
||||
}
|
||||
|
||||
message Resources {
|
||||
Processor processor = 1;
|
||||
PhysicalMemory memory = 2;
|
||||
GPU gpu = 3;
|
||||
}
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: notification.proto
|
||||
|
||||
package common
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
wrappers "github.com/golang/protobuf/ptypes/wrappers"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Notification struct {
|
||||
// Name of the entity sending notification
|
||||
EntityName string `protobuf:"bytes,1,opt,name=entityName,proto3" json:"entityName,omitempty"`
|
||||
// Type of operation that happened on the entity
|
||||
Operation Operation `protobuf:"varint,2,opt,name=operation,proto3,enum=moc.Operation" json:"operation,omitempty"`
|
||||
// Optional: Additional message that the entity would like to send
|
||||
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
|
||||
// Name of the parent Entity
|
||||
ParentEntityName string `protobuf:"bytes,4,opt,name=parentEntityName,proto3" json:"parentEntityName,omitempty"`
|
||||
// Optional flag to specify if the notification is async
|
||||
Async bool `protobuf:"varint,5,opt,name=async,proto3" json:"async,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Notification) Reset() { *m = Notification{} }
|
||||
func (m *Notification) String() string { return proto.CompactTextString(m) }
|
||||
func (*Notification) ProtoMessage() {}
|
||||
func (*Notification) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_736a457d4a5efa07, []int{0}
|
||||
}
|
||||
|
||||
func (m *Notification) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Notification.Unmarshal(m, b)
|
||||
}
|
||||
func (m *Notification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_Notification.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *Notification) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Notification.Merge(m, src)
|
||||
}
|
||||
func (m *Notification) XXX_Size() int {
|
||||
return xxx_messageInfo_Notification.Size(m)
|
||||
}
|
||||
func (m *Notification) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Notification.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Notification proto.InternalMessageInfo
|
||||
|
||||
func (m *Notification) GetEntityName() string {
|
||||
if m != nil {
|
||||
return m.EntityName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Notification) GetOperation() Operation {
|
||||
if m != nil {
|
||||
return m.Operation
|
||||
}
|
||||
return Operation_GET
|
||||
}
|
||||
|
||||
func (m *Notification) GetMessage() string {
|
||||
if m != nil {
|
||||
return m.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Notification) GetParentEntityName() string {
|
||||
if m != nil {
|
||||
return m.ParentEntityName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Notification) GetAsync() bool {
|
||||
if m != nil {
|
||||
return m.Async
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type NotificationResponse struct {
|
||||
Notifications []*Notification `protobuf:"bytes,1,rep,name=notifications,proto3" json:"notifications,omitempty"`
|
||||
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
|
||||
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *NotificationResponse) Reset() { *m = NotificationResponse{} }
|
||||
func (m *NotificationResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*NotificationResponse) ProtoMessage() {}
|
||||
func (*NotificationResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_736a457d4a5efa07, []int{1}
|
||||
}
|
||||
|
||||
func (m *NotificationResponse) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_NotificationResponse.Unmarshal(m, b)
|
||||
}
|
||||
func (m *NotificationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_NotificationResponse.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *NotificationResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_NotificationResponse.Merge(m, src)
|
||||
}
|
||||
func (m *NotificationResponse) XXX_Size() int {
|
||||
return xxx_messageInfo_NotificationResponse.Size(m)
|
||||
}
|
||||
func (m *NotificationResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_NotificationResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_NotificationResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *NotificationResponse) GetNotifications() []*Notification {
|
||||
if m != nil {
|
||||
return m.Notifications
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NotificationResponse) GetResult() *wrappers.BoolValue {
|
||||
if m != nil {
|
||||
return m.Result
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NotificationResponse) GetError() string {
|
||||
if m != nil {
|
||||
return m.Error
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*Notification)(nil), "moc.Notification")
|
||||
proto.RegisterType((*NotificationResponse)(nil), "moc.NotificationResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("notification.proto", fileDescriptor_736a457d4a5efa07) }
|
||||
|
||||
var fileDescriptor_736a457d4a5efa07 = []byte{
|
||||
// 299 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xb1, 0x6a, 0xf3, 0x30,
|
||||
0x14, 0x85, 0xd1, 0x9f, 0x3f, 0x69, 0xa3, 0xa4, 0xa1, 0x15, 0x19, 0x4c, 0x86, 0x60, 0x52, 0x0a,
|
||||
0xa6, 0x14, 0x19, 0xdc, 0xa1, 0x7b, 0x20, 0x6b, 0x0a, 0x1e, 0x3a, 0x74, 0x53, 0xc4, 0xb5, 0x2b,
|
||||
0xb0, 0x74, 0x85, 0x24, 0x53, 0xf2, 0x28, 0x7d, 0x93, 0x3e, 0x5e, 0xa9, 0x1c, 0x13, 0x87, 0x8e,
|
||||
0xf7, 0xf0, 0xdd, 0xa3, 0x73, 0x8f, 0x28, 0x33, 0x18, 0x54, 0xa5, 0xa4, 0x08, 0x0a, 0x0d, 0xb7,
|
||||
0x0e, 0x03, 0xb2, 0x91, 0x46, 0xb9, 0x5a, 0xd7, 0x88, 0x75, 0x03, 0x79, 0x94, 0x0e, 0x6d, 0x95,
|
||||
0x7f, 0x3a, 0x61, 0x2d, 0x38, 0xdf, 0x41, 0xab, 0xb9, 0x44, 0xad, 0xfb, 0x95, 0xcd, 0x37, 0xa1,
|
||||
0xf3, 0xfd, 0xc0, 0x89, 0xad, 0x29, 0x05, 0x13, 0x54, 0x38, 0xee, 0x85, 0x86, 0x84, 0xa4, 0x24,
|
||||
0x9b, 0x96, 0x03, 0x85, 0x3d, 0xd1, 0x29, 0x5a, 0x70, 0x11, 0x4e, 0xfe, 0xa5, 0x24, 0x5b, 0x14,
|
||||
0x0b, 0xae, 0x51, 0xf2, 0xd7, 0x5e, 0x2d, 0xcf, 0x00, 0x4b, 0xe8, 0x95, 0x06, 0xef, 0x45, 0x0d,
|
||||
0xc9, 0x28, 0x5a, 0xf5, 0x23, 0x7b, 0xa4, 0xb7, 0x56, 0x38, 0x30, 0x61, 0x77, 0x7e, 0xed, 0x7f,
|
||||
0x44, 0xfe, 0xe8, 0x6c, 0x49, 0xc7, 0xc2, 0x1f, 0x8d, 0x4c, 0xc6, 0x29, 0xc9, 0xae, 0xcb, 0x6e,
|
||||
0xd8, 0x7c, 0x11, 0xba, 0x1c, 0x46, 0x2f, 0xc1, 0x5b, 0x34, 0x1e, 0xd8, 0x0b, 0xbd, 0x19, 0x96,
|
||||
0xe3, 0x13, 0x92, 0x8e, 0xb2, 0x59, 0x71, 0x17, 0x63, 0x5e, 0x6c, 0x5c, 0x72, 0xac, 0xa0, 0x93,
|
||||
0x12, 0x7c, 0xdb, 0x84, 0x78, 0xd8, 0xac, 0x58, 0xf1, 0xae, 0x4b, 0xde, 0x77, 0xc9, 0xb7, 0x88,
|
||||
0xcd, 0x9b, 0x68, 0x5a, 0x28, 0x4f, 0xe4, 0x6f, 0xb6, 0x9d, 0x73, 0xe8, 0x4e, 0xf7, 0x75, 0xc3,
|
||||
0xf6, 0xe1, 0xfd, 0xbe, 0x56, 0xe1, 0xa3, 0x3d, 0x70, 0x89, 0x3a, 0xd7, 0x4a, 0x3a, 0xf4, 0x58,
|
||||
0x85, 0x5c, 0xa3, 0xcc, 0x9d, 0x95, 0x79, 0xf7, 0x07, 0x87, 0x49, 0x34, 0x7e, 0xfe, 0x09, 0x00,
|
||||
0x00, 0xff, 0xff, 0x92, 0x45, 0xc7, 0xfa, 0xcd, 0x01, 0x00, 0x00,
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/common";
|
||||
|
||||
package moc;
|
||||
import "google/protobuf/wrappers.proto";
|
||||
import "common.proto";
|
||||
|
||||
message Notification {
|
||||
// Name of the entity sending notification
|
||||
string entityName = 1;
|
||||
// Type of operation that happened on the entity
|
||||
Operation operation = 2;
|
||||
// Optional: Additional message that the entity would like to send
|
||||
string message = 3;
|
||||
// Name of the parent Entity
|
||||
string parentEntityName = 4;
|
||||
// Optional flag to specify if the notification is async
|
||||
bool async = 5;
|
||||
}
|
||||
|
||||
message NotificationResponse {
|
||||
repeated Notification notifications = 1;
|
||||
google.protobuf.BoolValue Result = 2;
|
||||
string Error = 3;
|
||||
}
|
|
@ -0,0 +1,225 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: security.proto
|
||||
|
||||
package common
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
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.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Algorithm int32
|
||||
|
||||
const (
|
||||
Algorithm_A_UNKNOWN Algorithm = 0
|
||||
Algorithm_RSA15 Algorithm = 1
|
||||
Algorithm_RSAOAEP Algorithm = 2
|
||||
Algorithm_RSAOAEP256 Algorithm = 3
|
||||
Algorithm_A256KW Algorithm = 4
|
||||
)
|
||||
|
||||
var Algorithm_name = map[int32]string{
|
||||
0: "A_UNKNOWN",
|
||||
1: "RSA15",
|
||||
2: "RSAOAEP",
|
||||
3: "RSAOAEP256",
|
||||
4: "A256KW",
|
||||
}
|
||||
|
||||
var Algorithm_value = map[string]int32{
|
||||
"A_UNKNOWN": 0,
|
||||
"RSA15": 1,
|
||||
"RSAOAEP": 2,
|
||||
"RSAOAEP256": 3,
|
||||
"A256KW": 4,
|
||||
}
|
||||
|
||||
func (x Algorithm) String() string {
|
||||
return proto.EnumName(Algorithm_name, int32(x))
|
||||
}
|
||||
|
||||
func (Algorithm) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_55a487c716a8b59c, []int{0}
|
||||
}
|
||||
|
||||
type KeyOperation int32
|
||||
|
||||
const (
|
||||
KeyOperation_ENCRYPT KeyOperation = 0
|
||||
KeyOperation_DECRYPT KeyOperation = 1
|
||||
KeyOperation_WRAPKEY KeyOperation = 2
|
||||
KeyOperation_UNWRAPKEY KeyOperation = 3
|
||||
)
|
||||
|
||||
var KeyOperation_name = map[int32]string{
|
||||
0: "ENCRYPT",
|
||||
1: "DECRYPT",
|
||||
2: "WRAPKEY",
|
||||
3: "UNWRAPKEY",
|
||||
}
|
||||
|
||||
var KeyOperation_value = map[string]int32{
|
||||
"ENCRYPT": 0,
|
||||
"DECRYPT": 1,
|
||||
"WRAPKEY": 2,
|
||||
"UNWRAPKEY": 3,
|
||||
}
|
||||
|
||||
func (x KeyOperation) String() string {
|
||||
return proto.EnumName(KeyOperation_name, int32(x))
|
||||
}
|
||||
|
||||
func (KeyOperation) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_55a487c716a8b59c, []int{1}
|
||||
}
|
||||
|
||||
// https://docs.microsoft.com/en-us/rest/api/keyvault/createkey/createkey#jsonwebkeytype
|
||||
type JsonWebKeyType int32
|
||||
|
||||
const (
|
||||
JsonWebKeyType_EC JsonWebKeyType = 0
|
||||
JsonWebKeyType_EC_HSM JsonWebKeyType = 1
|
||||
JsonWebKeyType_RSA JsonWebKeyType = 2
|
||||
JsonWebKeyType_RSA_HSM JsonWebKeyType = 3
|
||||
JsonWebKeyType_OCT JsonWebKeyType = 4
|
||||
JsonWebKeyType_AES JsonWebKeyType = 5
|
||||
)
|
||||
|
||||
var JsonWebKeyType_name = map[int32]string{
|
||||
0: "EC",
|
||||
1: "EC_HSM",
|
||||
2: "RSA",
|
||||
3: "RSA_HSM",
|
||||
4: "OCT",
|
||||
5: "AES",
|
||||
}
|
||||
|
||||
var JsonWebKeyType_value = map[string]int32{
|
||||
"EC": 0,
|
||||
"EC_HSM": 1,
|
||||
"RSA": 2,
|
||||
"RSA_HSM": 3,
|
||||
"OCT": 4,
|
||||
"AES": 5,
|
||||
}
|
||||
|
||||
func (x JsonWebKeyType) String() string {
|
||||
return proto.EnumName(JsonWebKeyType_name, int32(x))
|
||||
}
|
||||
|
||||
func (JsonWebKeyType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_55a487c716a8b59c, []int{2}
|
||||
}
|
||||
|
||||
type JsonWebKeyCurveName int32
|
||||
|
||||
const (
|
||||
JsonWebKeyCurveName_P_256 JsonWebKeyCurveName = 0
|
||||
JsonWebKeyCurveName_P_256K JsonWebKeyCurveName = 1
|
||||
JsonWebKeyCurveName_P_384 JsonWebKeyCurveName = 2
|
||||
JsonWebKeyCurveName_P_521 JsonWebKeyCurveName = 3
|
||||
)
|
||||
|
||||
var JsonWebKeyCurveName_name = map[int32]string{
|
||||
0: "P_256",
|
||||
1: "P_256K",
|
||||
2: "P_384",
|
||||
3: "P_521",
|
||||
}
|
||||
|
||||
var JsonWebKeyCurveName_value = map[string]int32{
|
||||
"P_256": 0,
|
||||
"P_256K": 1,
|
||||
"P_384": 2,
|
||||
"P_521": 3,
|
||||
}
|
||||
|
||||
func (x JsonWebKeyCurveName) String() string {
|
||||
return proto.EnumName(JsonWebKeyCurveName_name, int32(x))
|
||||
}
|
||||
|
||||
func (JsonWebKeyCurveName) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_55a487c716a8b59c, []int{3}
|
||||
}
|
||||
|
||||
type KeySize int32
|
||||
|
||||
const (
|
||||
KeySize_K_UNKNOWN KeySize = 0
|
||||
KeySize__256 KeySize = 1
|
||||
KeySize__2048 KeySize = 2
|
||||
KeySize__3072 KeySize = 3
|
||||
KeySize__4096 KeySize = 4
|
||||
)
|
||||
|
||||
var KeySize_name = map[int32]string{
|
||||
0: "K_UNKNOWN",
|
||||
1: "_256",
|
||||
2: "_2048",
|
||||
3: "_3072",
|
||||
4: "_4096",
|
||||
}
|
||||
|
||||
var KeySize_value = map[string]int32{
|
||||
"K_UNKNOWN": 0,
|
||||
"_256": 1,
|
||||
"_2048": 2,
|
||||
"_3072": 3,
|
||||
"_4096": 4,
|
||||
}
|
||||
|
||||
func (x KeySize) String() string {
|
||||
return proto.EnumName(KeySize_name, int32(x))
|
||||
}
|
||||
|
||||
func (KeySize) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_55a487c716a8b59c, []int{4}
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("moc.Algorithm", Algorithm_name, Algorithm_value)
|
||||
proto.RegisterEnum("moc.KeyOperation", KeyOperation_name, KeyOperation_value)
|
||||
proto.RegisterEnum("moc.JsonWebKeyType", JsonWebKeyType_name, JsonWebKeyType_value)
|
||||
proto.RegisterEnum("moc.JsonWebKeyCurveName", JsonWebKeyCurveName_name, JsonWebKeyCurveName_value)
|
||||
proto.RegisterEnum("moc.KeySize", KeySize_name, KeySize_value)
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("security.proto", fileDescriptor_55a487c716a8b59c) }
|
||||
|
||||
var fileDescriptor_55a487c716a8b59c = []byte{
|
||||
// 340 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x51, 0x8f, 0x9a, 0x40,
|
||||
0x14, 0x85, 0x15, 0x50, 0xeb, 0x6d, 0x6b, 0x6e, 0xa6, 0x3f, 0xa1, 0xe9, 0x0b, 0x0f, 0xa2, 0x28,
|
||||
0xd6, 0x3e, 0x8e, 0x48, 0xd2, 0x74, 0x5a, 0x20, 0xa0, 0x21, 0xf6, 0x85, 0x28, 0x99, 0x2a, 0x49,
|
||||
0xc7, 0x21, 0x88, 0x9b, 0xb0, 0xbf, 0x7e, 0x33, 0x83, 0x9b, 0xdd, 0xb7, 0x73, 0x4e, 0x72, 0xbe,
|
||||
0x7b, 0xef, 0x0c, 0x4c, 0x6e, 0xbc, 0xb8, 0xd7, 0x65, 0xd3, 0x4e, 0xab, 0x5a, 0x36, 0x92, 0x98,
|
||||
0x42, 0x16, 0x76, 0x08, 0x63, 0xfa, 0xff, 0x2c, 0xeb, 0xb2, 0xb9, 0x08, 0xf2, 0x19, 0xc6, 0x34,
|
||||
0xdf, 0x87, 0x2c, 0x8c, 0xb2, 0x10, 0x7b, 0x64, 0x0c, 0x83, 0x24, 0xa5, 0x73, 0x0f, 0xfb, 0xe4,
|
||||
0x23, 0x8c, 0x92, 0x94, 0x46, 0x34, 0x88, 0xd1, 0x20, 0x13, 0x80, 0x87, 0x71, 0xbd, 0x15, 0x9a,
|
||||
0x04, 0x60, 0x48, 0x5d, 0x6f, 0xc5, 0x32, 0xb4, 0xec, 0x2d, 0x7c, 0x62, 0xbc, 0x8d, 0x2a, 0x5e,
|
||||
0x1f, 0x9b, 0x52, 0x5e, 0x55, 0x31, 0x08, 0xfd, 0xe4, 0x10, 0xef, 0xb0, 0xa7, 0xcc, 0x36, 0xe8,
|
||||
0x8c, 0x46, 0x66, 0x09, 0x8d, 0x59, 0x70, 0x40, 0x43, 0x4d, 0xde, 0x87, 0xaf, 0xd6, 0xb4, 0x7f,
|
||||
0xc3, 0xe4, 0xd7, 0x4d, 0x5e, 0x33, 0x7e, 0x62, 0xbc, 0xdd, 0xb5, 0x15, 0x27, 0x43, 0x30, 0x02,
|
||||
0x1f, 0x7b, 0x6a, 0x56, 0xe0, 0xe7, 0x3f, 0xd3, 0x3f, 0xd8, 0x27, 0x23, 0x30, 0x93, 0x94, 0xa2,
|
||||
0xf1, 0xd8, 0x4e, 0xa7, 0xa6, 0x4a, 0x23, 0x7f, 0x87, 0x96, 0x12, 0x34, 0x48, 0x71, 0x60, 0x6f,
|
||||
0xe0, 0xcb, 0x1b, 0xcd, 0xbf, 0xd7, 0x4f, 0x3c, 0x3c, 0x0a, 0xae, 0xce, 0x8b, 0x73, 0x75, 0x81,
|
||||
0xa6, 0x6a, 0xc9, 0xb0, 0xdf, 0xc5, 0x8b, 0xf5, 0x12, 0x8d, 0x4e, 0x7a, 0xee, 0x1c, 0x4d, 0xdb,
|
||||
0x87, 0x11, 0xe3, 0x6d, 0x5a, 0x3e, 0x73, 0xb5, 0x2b, 0x7b, 0xf7, 0x4a, 0x1f, 0xc0, 0xd2, 0x14,
|
||||
0xdd, 0xcc, 0xdd, 0xd9, 0x72, 0xdd, 0x35, 0xf3, 0xc5, 0xec, 0xbb, 0x8b, 0xa6, 0x96, 0xcb, 0xd9,
|
||||
0x8f, 0x15, 0x5a, 0x9b, 0x6f, 0x7f, 0xbf, 0x9e, 0xcb, 0xe6, 0x72, 0x3f, 0x4d, 0x0b, 0x29, 0x1c,
|
||||
0x51, 0x16, 0xb5, 0xbc, 0xc9, 0x7f, 0x8d, 0x23, 0x64, 0xe1, 0xd4, 0x55, 0xe1, 0x14, 0x52, 0x08,
|
||||
0x79, 0x3d, 0x0d, 0xf5, 0xff, 0x2c, 0x5e, 0x02, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x5f, 0x4d, 0xb4,
|
||||
0xb1, 0x01, 0x00, 0x00,
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the Apache v2.0 license.
|
||||
|
||||
syntax = "proto3";
|
||||
option go_package = "github.com/microsoft/moc-proto/rpc/common";
|
||||
|
||||
package moc;
|
||||
|
||||
enum Algorithm {
|
||||
A_UNKNOWN = 0;
|
||||
RSA15 = 1;
|
||||
RSAOAEP = 2;
|
||||
RSAOAEP256 = 3;
|
||||
A256KW = 4;
|
||||
}
|
||||
|
||||
enum KeyOperation {
|
||||
ENCRYPT = 0;
|
||||
DECRYPT = 1;
|
||||
WRAPKEY = 2;
|
||||
UNWRAPKEY = 3;
|
||||
}
|
||||
|
||||
// https://docs.microsoft.com/en-us/rest/api/keyvault/createkey/createkey#jsonwebkeytype
|
||||
enum JsonWebKeyType {
|
||||
EC = 0;
|
||||
EC_HSM = 1;
|
||||
RSA = 2;
|
||||
RSA_HSM = 3;
|
||||
OCT = 4;
|
||||
AES = 5;
|
||||
}
|
||||
|
||||
enum JsonWebKeyCurveName {
|
||||
P_256 = 0;
|
||||
P_256K = 1;
|
||||
P_384 = 2;
|
||||
P_521 = 3;
|
||||
}
|
||||
|
||||
enum KeySize {
|
||||
K_UNKNOWN = 0;
|
||||
_256 = 1;
|
||||
_2048 = 2;
|
||||
_3072 = 3;
|
||||
_4096 = 4;
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the Apache v2.0 license.
|
||||
|
||||
# Make sure the script exits on first failure
|
||||
# and returns the proper exit code to the
|
||||
# shell
|
||||
set -e
|
||||
|
||||
####
|
||||
Agent="cloudagent"
|
||||
echo "Generating Protoc for $Agent"
|
||||
Module="admin"
|
||||
echo "Generating $Module protoc"
|
||||
protoc -I $Agent/$Module/credentialmonitor -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/credentialmonitor/credentialmonitor.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/logging -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/logging/logging.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
|
||||
Module="network"
|
||||
echo "Generating $Agent/$Module protoc"
|
||||
protoc -I $Agent/$Module/virtualnetwork -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/virtualnetwork/virtualnetwork.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/loadbalancer -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/loadbalancer/loadbalancer.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/networkinterface -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/networkinterface/networkinterface.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/vippool -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/vippool/vippool.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/macpool -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/macpool/macpool.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
|
||||
# Generate compute agent protoc
|
||||
Module="compute"
|
||||
echo "Generating $Agent/$Module protoc"
|
||||
protoc -I $Agent/$Module/virtualmachine -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/virtualmachine/virtualmachine.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/virtualmachinescaleset -I $Agent/$Module/virtualmachine -I $GOPATH/src/github.com/protocolbuffers/protobuf/src -I $Agent/network/networkinterface -I ./common $Agent/$Module/virtualmachinescaleset/virtualmachinescaleset.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/virtualmachineimage -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/virtualmachineimage/virtualmachineimage.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/galleryimage -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/galleryimage/galleryimage.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
|
||||
Module="storage"
|
||||
echo "Generating $Agent/$Module protoc"
|
||||
protoc -I $Agent/$Module/virtualharddisk -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/virtualharddisk/virtualharddisk.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/container -I ./common -I $GOPATH/src/github.com/protocolbuffers/protobuf/src $Agent/$Module/container/container.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
|
||||
Module="cloud"
|
||||
echo "Generating $Agent/$Module protoc"
|
||||
protoc -I $Agent/$Module/group -I ./common $Agent/$Module/group/group.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/node -I ./common $Agent/$Module/node/node.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/kubernetes -I ./common $Agent/$Module/kubernetes/kubernetes.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/cluster -I $Agent/$Module/node -I ./common $Agent/$Module/cluster/cluster.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/location -I ./common $Agent/$Module/location/location.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/subscription -I ./common $Agent/$Module/subscription/subscription.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
|
||||
|
||||
Module="security"
|
||||
echo "Generating $Agent/$Module protoc"
|
||||
|
||||
protoc -I $Agent/$Module/identity -I ./common $Agent/$Module/identity/identity.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/keyvault/secret -I ./common $Agent/$Module/keyvault/secret/secret.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/keyvault/key -I ./common $Agent/$Module/keyvault/key/key.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/keyvault -I ./common -I $Agent/$Module/keyvault/secret $Agent/$Module/keyvault/keyvault.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/authentication -I ./common -I $Agent/$Module/identity $Agent/$Module/authentication/authentication.proto --go_out=plugins=grpc:$GOPATH/src
|
||||
protoc -I $Agent/$Module/certificate -I ./common -I $Agent/$Module/certificate $Agent/$Module/certificate/certificate.proto --go_out=plugins=grpc:$GOPATH/src
|
Загрузка…
Ссылка в новой задаче