зеркало из https://github.com/docker/node-sdk.git
Initial commit
This commit is contained in:
Родитель
17f8fa2991
Коммит
b524263aed
|
@ -0,0 +1,42 @@
|
||||||
|
name: CI
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Begin CI...
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Use Node 12
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
|
||||||
|
- name: Use cached node_modules
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: node_modules
|
||||||
|
key: nodeModules-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
nodeModules-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install --frozen-lockfile
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: yarn lint
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: yarn test --ci --coverage --maxWorkers=2
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: yarn build
|
||||||
|
env:
|
||||||
|
CI: true
|
|
@ -0,0 +1,4 @@
|
||||||
|
*.log
|
||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
dist
|
|
@ -1,2 +1,3 @@
|
||||||
# node-sdk
|
# node-sdk
|
||||||
|
|
||||||
Docker cli gRPC client in javascript
|
Docker cli gRPC client in javascript
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
'@babel/preset-typescript',
|
||||||
|
['@babel/preset-env', { targets: { node: 'current' } }],
|
||||||
|
],
|
||||||
|
plugins: [],
|
||||||
|
};
|
|
@ -0,0 +1,22 @@
|
||||||
|
import * as grpc from '@grpc/grpc-js';
|
||||||
|
|
||||||
|
import { ListRequest, ListResponse } from '../src/contexts';
|
||||||
|
import { Contexts } from '../src';
|
||||||
|
|
||||||
|
const client = new Contexts();
|
||||||
|
client.list(
|
||||||
|
new ListRequest(),
|
||||||
|
(error: grpc.ServiceError | null, res: ListResponse) => {
|
||||||
|
if (error != null) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
res.getContextsList().forEach((context) => {
|
||||||
|
console.log(
|
||||||
|
context.getName(),
|
||||||
|
context.getContexttype(),
|
||||||
|
context.getCurrent() ? '*' : ''
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
|
@ -0,0 +1,22 @@
|
||||||
|
import * as grpc from '@grpc/grpc-js';
|
||||||
|
|
||||||
|
import { ListRequest, ListResponse } from '../src/containers';
|
||||||
|
import { Containers } from '../src/index';
|
||||||
|
|
||||||
|
const client = new Containers();
|
||||||
|
client.list(
|
||||||
|
new ListRequest(),
|
||||||
|
(error: grpc.ServiceError | null, response: ListResponse) => {
|
||||||
|
if (error != null) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
const containers = response.getContainersList();
|
||||||
|
containers.forEach((container) => {
|
||||||
|
console.log(
|
||||||
|
container.getId(),
|
||||||
|
container.getImage(),
|
||||||
|
container.getStatus()
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
|
@ -0,0 +1,60 @@
|
||||||
|
{
|
||||||
|
"version": "0.1.0",
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "dist/index.js",
|
||||||
|
"typings": "dist/index.d.ts",
|
||||||
|
"files": [
|
||||||
|
"dist",
|
||||||
|
"src"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "rollup -w -c",
|
||||||
|
"build": "rollup -c",
|
||||||
|
"test": "jest",
|
||||||
|
"test:watch": "jest --watch",
|
||||||
|
"lint": "eslint src --ext .ts",
|
||||||
|
"download-protos": "ts-node -O '{\"module\": \"CommonJS\"}' scripts/download-protos.ts"
|
||||||
|
},
|
||||||
|
"prettier": {
|
||||||
|
"printWidth": 80,
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"trailingComma": "es5"
|
||||||
|
},
|
||||||
|
"name": "@docker/sdk",
|
||||||
|
"author": "Docker Inc.",
|
||||||
|
"module": "dist/mylib.esm.js",
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.10.2",
|
||||||
|
"@babel/preset-env": "^7.10.2",
|
||||||
|
"@babel/preset-typescript": "^7.10.1",
|
||||||
|
"@rollup/plugin-commonjs": "^13.0.0",
|
||||||
|
"@rollup/plugin-typescript": "^4.1.2",
|
||||||
|
"@types/node": "^14.0.11",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^3.1.0",
|
||||||
|
"@typescript-eslint/parser": "^3.1.0",
|
||||||
|
"eslint": "^7.2.0",
|
||||||
|
"eslint-config-airbnb-base": "^14.1.0",
|
||||||
|
"eslint-plugin-import": "^2.20.2",
|
||||||
|
"grpc-tools": "^1.9.0",
|
||||||
|
"grpc_tools_node_protoc_ts": "^4.0.0",
|
||||||
|
"jest": "^26.0.1",
|
||||||
|
"prettier": "^2.0.5",
|
||||||
|
"rollup": "^2.13.1",
|
||||||
|
"rollup-plugin-terser": "^6.1.0",
|
||||||
|
"ts-node": "^8.10.2",
|
||||||
|
"tslib": "^2.0.0",
|
||||||
|
"typescript": "^3.9.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@grpc/grpc-js": "^1.0.5",
|
||||||
|
"@grpc/proto-loader": "^0.5.4",
|
||||||
|
"@octokit/rest": "^17.10.0",
|
||||||
|
"google-auth-library": "^6.0.1",
|
||||||
|
"google-protobuf": "^3.12.2",
|
||||||
|
"grpc": "^1.24.3"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
node_modules/.bin/grpc_tools_node_protoc \
|
||||||
|
--js_out=import_style=commonjs,binary:./src/protos \
|
||||||
|
--grpc_out=grpc_js:./src/protos \
|
||||||
|
-I src/protos \
|
||||||
|
src/protos/contexts/v1/*.proto \
|
||||||
|
src/protos/containers/v1/*.proto \
|
||||||
|
src/protos/compose/v1/*.proto \
|
||||||
|
src/protos/streams/v1/*.proto
|
||||||
|
|
||||||
|
# generate d.ts codes
|
||||||
|
node_modules/.bin/grpc_tools_node_protoc \
|
||||||
|
--plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts \
|
||||||
|
--ts_out=generate_package_definition:./src/protos \
|
||||||
|
-I src/protos \
|
||||||
|
src/protos/contexts/v1/*.proto \
|
||||||
|
src/protos/containers/v1/*.proto \
|
||||||
|
src/protos/compose/v1/*.proto \
|
||||||
|
src/protos/streams/v1/*.proto
|
|
@ -0,0 +1,22 @@
|
||||||
|
import typescript from '@rollup/plugin-typescript';
|
||||||
|
import commonjs from '@rollup/plugin-commonjs';
|
||||||
|
import { terser } from 'rollup-plugin-terser';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: 'src/index.ts',
|
||||||
|
external: ['@grpc/grpc-js', '@grpc/proto-loader', 'google-protobuf'],
|
||||||
|
treeshake: false,
|
||||||
|
output: {
|
||||||
|
dir: 'dist',
|
||||||
|
format: 'cjs',
|
||||||
|
compact: true,
|
||||||
|
sourcemap: true,
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
typescript({
|
||||||
|
outDir: 'dist',
|
||||||
|
}),
|
||||||
|
commonjs(),
|
||||||
|
process.env.NODE_ENV === 'production' && terser(),
|
||||||
|
],
|
||||||
|
};
|
|
@ -0,0 +1,39 @@
|
||||||
|
import * as fs from 'fs';
|
||||||
|
import * as path from 'path';
|
||||||
|
import { Readable } from 'stream';
|
||||||
|
import { Octokit } from '@octokit/rest';
|
||||||
|
|
||||||
|
const octokit = new Octokit({
|
||||||
|
auth: process.env.GITHUB_TOKEN,
|
||||||
|
});
|
||||||
|
|
||||||
|
const get = async (p: string) => {
|
||||||
|
try {
|
||||||
|
const response = await octokit.repos.getContents({
|
||||||
|
owner: 'docker',
|
||||||
|
repo: 'api',
|
||||||
|
path: p,
|
||||||
|
});
|
||||||
|
if (Array.isArray(response.data)) {
|
||||||
|
for (let n of response.data) {
|
||||||
|
await get(n.path);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (p.endsWith('.proto')) {
|
||||||
|
console.log(`Downloading ${response.data.path}`);
|
||||||
|
const dir = path.dirname(response.data.path);
|
||||||
|
fs.mkdirSync(`src/${dir}`, { recursive: true });
|
||||||
|
const buffer = Buffer.from(response.data.content, 'base64');
|
||||||
|
const data = Readable.from(buffer.toString('ascii'));
|
||||||
|
data.pipe(fs.createWriteStream(`src/${p}`));
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
(async function () {
|
||||||
|
get('protos');
|
||||||
|
})();
|
|
@ -0,0 +1,16 @@
|
||||||
|
export {
|
||||||
|
ExecRequest,
|
||||||
|
ExecResponse,
|
||||||
|
ListRequest,
|
||||||
|
ListResponse,
|
||||||
|
LogsRequest,
|
||||||
|
LogsResponse,
|
||||||
|
RunRequest,
|
||||||
|
RunResponse,
|
||||||
|
StopRequest,
|
||||||
|
StopResponse,
|
||||||
|
DeleteRequest,
|
||||||
|
DeleteResponse,
|
||||||
|
Container,
|
||||||
|
Port,
|
||||||
|
} from './protos/containers/v1/containers_pb';
|
|
@ -0,0 +1,6 @@
|
||||||
|
export {
|
||||||
|
ListRequest,
|
||||||
|
ListResponse,
|
||||||
|
SetCurrentRequest,
|
||||||
|
SetCurrentResponse,
|
||||||
|
} from './protos/contexts/v1/contexts_pb';
|
|
@ -0,0 +1,32 @@
|
||||||
|
import * as grpc from '@grpc/grpc-js';
|
||||||
|
import { ContainersClient } from './protos/containers/v1/containers_grpc_pb';
|
||||||
|
import { ContextsClient } from './protos/contexts/v1/contexts_grpc_pb';
|
||||||
|
import { ComposeClient } from './protos/compose/v1/compose_grpc_pb';
|
||||||
|
import { StreamingClient } from './protos/streams/v1/streams_grpc_pb';
|
||||||
|
|
||||||
|
// ~/Library/Containers/com.docker.docker/Data/cli-api.sock
|
||||||
|
const address = 'unix:///tmp/backend.sock';
|
||||||
|
|
||||||
|
export class Containers extends ContainersClient {
|
||||||
|
constructor() {
|
||||||
|
super(address, grpc.credentials.createInsecure());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Contexts extends ContextsClient {
|
||||||
|
constructor() {
|
||||||
|
super(address, grpc.credentials.createInsecure());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Compose extends ComposeClient {
|
||||||
|
constructor() {
|
||||||
|
super(address, grpc.credentials.createInsecure());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Streams extends StreamingClient {
|
||||||
|
constructor() {
|
||||||
|
super(address, grpc.credentials.createInsecure());
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
Copyright (c) 2020 Docker Inc.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person
|
||||||
|
obtaining a copy of this software and associated documentation
|
||||||
|
files (the "Software"), to deal in the Software without
|
||||||
|
restriction, including without limitation the rights to use, copy,
|
||||||
|
modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED,
|
||||||
|
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||||
|
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package com.docker.api.protos.compose.v1;
|
||||||
|
|
||||||
|
option go_package = "github.com/docker/api/protos/compose/v1;v1";
|
||||||
|
|
||||||
|
service Compose {
|
||||||
|
rpc Up(ComposeUpRequest) returns (ComposeUpResponse);
|
||||||
|
rpc Down(ComposeDownRequest) returns (ComposeDownResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
message ComposeUpRequest {
|
||||||
|
string projectName = 1;
|
||||||
|
string workDir = 2;
|
||||||
|
repeated string files = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ComposeUpResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
message ComposeDownRequest {
|
||||||
|
}
|
||||||
|
|
||||||
|
message ComposeDownResponse {
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
// package: com.docker.api.protos.compose.v1
|
||||||
|
// file: compose/v1/compose.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as grpc from "@grpc/grpc-js";
|
||||||
|
import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call";
|
||||||
|
import * as compose_v1_compose_pb from "../../compose/v1/compose_pb";
|
||||||
|
|
||||||
|
interface IComposeService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
|
||||||
|
up: IComposeService_IUp;
|
||||||
|
down: IComposeService_IDown;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IComposeService_IUp extends grpc.MethodDefinition<compose_v1_compose_pb.ComposeUpRequest, compose_v1_compose_pb.ComposeUpResponse> {
|
||||||
|
path: string; // "/com.docker.api.protos.compose.v1.Compose/Up"
|
||||||
|
requestStream: boolean; // false
|
||||||
|
responseStream: boolean; // false
|
||||||
|
requestSerialize: grpc.serialize<compose_v1_compose_pb.ComposeUpRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<compose_v1_compose_pb.ComposeUpRequest>;
|
||||||
|
responseSerialize: grpc.serialize<compose_v1_compose_pb.ComposeUpResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<compose_v1_compose_pb.ComposeUpResponse>;
|
||||||
|
}
|
||||||
|
interface IComposeService_IDown extends grpc.MethodDefinition<compose_v1_compose_pb.ComposeDownRequest, compose_v1_compose_pb.ComposeDownResponse> {
|
||||||
|
path: string; // "/com.docker.api.protos.compose.v1.Compose/Down"
|
||||||
|
requestStream: boolean; // false
|
||||||
|
responseStream: boolean; // false
|
||||||
|
requestSerialize: grpc.serialize<compose_v1_compose_pb.ComposeDownRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<compose_v1_compose_pb.ComposeDownRequest>;
|
||||||
|
responseSerialize: grpc.serialize<compose_v1_compose_pb.ComposeDownResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<compose_v1_compose_pb.ComposeDownResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ComposeService: IComposeService;
|
||||||
|
|
||||||
|
export interface IComposeServer {
|
||||||
|
up: grpc.handleUnaryCall<compose_v1_compose_pb.ComposeUpRequest, compose_v1_compose_pb.ComposeUpResponse>;
|
||||||
|
down: grpc.handleUnaryCall<compose_v1_compose_pb.ComposeDownRequest, compose_v1_compose_pb.ComposeDownResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IComposeClient {
|
||||||
|
up(request: compose_v1_compose_pb.ComposeUpRequest, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeUpResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
up(request: compose_v1_compose_pb.ComposeUpRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeUpResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
up(request: compose_v1_compose_pb.ComposeUpRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeUpResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
down(request: compose_v1_compose_pb.ComposeDownRequest, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeDownResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
down(request: compose_v1_compose_pb.ComposeDownRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeDownResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
down(request: compose_v1_compose_pb.ComposeDownRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeDownResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ComposeClient extends grpc.Client implements IComposeClient {
|
||||||
|
constructor(address: string, credentials: grpc.ChannelCredentials, options?: object);
|
||||||
|
public up(request: compose_v1_compose_pb.ComposeUpRequest, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeUpResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public up(request: compose_v1_compose_pb.ComposeUpRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeUpResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public up(request: compose_v1_compose_pb.ComposeUpRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeUpResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public down(request: compose_v1_compose_pb.ComposeDownRequest, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeDownResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public down(request: compose_v1_compose_pb.ComposeDownRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeDownResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public down(request: compose_v1_compose_pb.ComposeDownRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: compose_v1_compose_pb.ComposeDownResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
}
|
|
@ -0,0 +1,104 @@
|
||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
|
||||||
|
// Original file comments:
|
||||||
|
//
|
||||||
|
// Copyright (c) 2020 Docker Inc.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person
|
||||||
|
// obtaining a copy of this software and associated documentation
|
||||||
|
// files (the "Software"), to deal in the Software without
|
||||||
|
// restriction, including without limitation the rights to use, copy,
|
||||||
|
// modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
// of the Software, and to permit persons to whom the Software is
|
||||||
|
// furnished to do so, subject to the following conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be
|
||||||
|
// included in all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
// EXPRESS OR IMPLIED,
|
||||||
|
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
// HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
// DAMAGES OR OTHER LIABILITY,
|
||||||
|
// WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
// TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||||
|
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
'use strict';
|
||||||
|
var grpc = require('@grpc/grpc-js');
|
||||||
|
var compose_v1_compose_pb = require('../../compose/v1/compose_pb.js');
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_compose_v1_ComposeDownRequest(arg) {
|
||||||
|
if (!(arg instanceof compose_v1_compose_pb.ComposeDownRequest)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.compose.v1.ComposeDownRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_compose_v1_ComposeDownRequest(buffer_arg) {
|
||||||
|
return compose_v1_compose_pb.ComposeDownRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_compose_v1_ComposeDownResponse(arg) {
|
||||||
|
if (!(arg instanceof compose_v1_compose_pb.ComposeDownResponse)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.compose.v1.ComposeDownResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_compose_v1_ComposeDownResponse(buffer_arg) {
|
||||||
|
return compose_v1_compose_pb.ComposeDownResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_compose_v1_ComposeUpRequest(arg) {
|
||||||
|
if (!(arg instanceof compose_v1_compose_pb.ComposeUpRequest)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.compose.v1.ComposeUpRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_compose_v1_ComposeUpRequest(buffer_arg) {
|
||||||
|
return compose_v1_compose_pb.ComposeUpRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_compose_v1_ComposeUpResponse(arg) {
|
||||||
|
if (!(arg instanceof compose_v1_compose_pb.ComposeUpResponse)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.compose.v1.ComposeUpResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_compose_v1_ComposeUpResponse(buffer_arg) {
|
||||||
|
return compose_v1_compose_pb.ComposeUpResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var ComposeService = exports.ComposeService = {
|
||||||
|
up: {
|
||||||
|
path: '/com.docker.api.protos.compose.v1.Compose/Up',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: compose_v1_compose_pb.ComposeUpRequest,
|
||||||
|
responseType: compose_v1_compose_pb.ComposeUpResponse,
|
||||||
|
requestSerialize: serialize_com_docker_api_protos_compose_v1_ComposeUpRequest,
|
||||||
|
requestDeserialize: deserialize_com_docker_api_protos_compose_v1_ComposeUpRequest,
|
||||||
|
responseSerialize: serialize_com_docker_api_protos_compose_v1_ComposeUpResponse,
|
||||||
|
responseDeserialize: deserialize_com_docker_api_protos_compose_v1_ComposeUpResponse,
|
||||||
|
},
|
||||||
|
down: {
|
||||||
|
path: '/com.docker.api.protos.compose.v1.Compose/Down',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: compose_v1_compose_pb.ComposeDownRequest,
|
||||||
|
responseType: compose_v1_compose_pb.ComposeDownResponse,
|
||||||
|
requestSerialize: serialize_com_docker_api_protos_compose_v1_ComposeDownRequest,
|
||||||
|
requestDeserialize: deserialize_com_docker_api_protos_compose_v1_ComposeDownRequest,
|
||||||
|
responseSerialize: serialize_com_docker_api_protos_compose_v1_ComposeDownResponse,
|
||||||
|
responseDeserialize: deserialize_com_docker_api_protos_compose_v1_ComposeDownResponse,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.ComposeClient = grpc.makeGenericClientConstructor(ComposeService);
|
|
@ -0,0 +1,89 @@
|
||||||
|
// package: com.docker.api.protos.compose.v1
|
||||||
|
// file: compose/v1/compose.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as jspb from "google-protobuf";
|
||||||
|
|
||||||
|
export class ComposeUpRequest extends jspb.Message {
|
||||||
|
getProjectname(): string;
|
||||||
|
setProjectname(value: string): ComposeUpRequest;
|
||||||
|
|
||||||
|
getWorkdir(): string;
|
||||||
|
setWorkdir(value: string): ComposeUpRequest;
|
||||||
|
|
||||||
|
clearFilesList(): void;
|
||||||
|
getFilesList(): Array<string>;
|
||||||
|
setFilesList(value: Array<string>): ComposeUpRequest;
|
||||||
|
addFiles(value: string, index?: number): string;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ComposeUpRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ComposeUpRequest): ComposeUpRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ComposeUpRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ComposeUpRequest;
|
||||||
|
static deserializeBinaryFromReader(message: ComposeUpRequest, reader: jspb.BinaryReader): ComposeUpRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ComposeUpRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
projectname: string,
|
||||||
|
workdir: string,
|
||||||
|
filesList: Array<string>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ComposeUpResponse extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ComposeUpResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ComposeUpResponse): ComposeUpResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ComposeUpResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ComposeUpResponse;
|
||||||
|
static deserializeBinaryFromReader(message: ComposeUpResponse, reader: jspb.BinaryReader): ComposeUpResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ComposeUpResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ComposeDownRequest extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ComposeDownRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ComposeDownRequest): ComposeDownRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ComposeDownRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ComposeDownRequest;
|
||||||
|
static deserializeBinaryFromReader(message: ComposeDownRequest, reader: jspb.BinaryReader): ComposeDownRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ComposeDownRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ComposeDownResponse extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ComposeDownResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ComposeDownResponse): ComposeDownResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ComposeDownResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ComposeDownResponse;
|
||||||
|
static deserializeBinaryFromReader(message: ComposeDownResponse, reader: jspb.BinaryReader): ComposeDownResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ComposeDownResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,622 @@
|
||||||
|
// source: compose/v1/compose.proto
|
||||||
|
/**
|
||||||
|
* @fileoverview
|
||||||
|
* @enhanceable
|
||||||
|
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||||
|
* field starts with 'MSG_' and isn't a translatable message.
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
|
||||||
|
var jspb = require('google-protobuf');
|
||||||
|
var goog = jspb;
|
||||||
|
var global = Function('return this')();
|
||||||
|
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.compose.v1.ComposeDownRequest', null, global);
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.compose.v1.ComposeDownResponse', null, global);
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.compose.v1.ComposeUpRequest', null, global);
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.compose.v1.ComposeUpResponse', null, global);
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.com.docker.api.protos.compose.v1.ComposeUpRequest.repeatedFields_, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.compose.v1.ComposeUpRequest, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.displayName = 'proto.com.docker.api.protos.compose.v1.ComposeUpRequest';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpResponse = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.compose.v1.ComposeUpResponse, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpResponse.displayName = 'proto.com.docker.api.protos.compose.v1.ComposeUpResponse';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownRequest = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.compose.v1.ComposeDownRequest, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownRequest.displayName = 'proto.com.docker.api.protos.compose.v1.ComposeDownRequest';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownResponse = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.compose.v1.ComposeDownResponse, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownResponse.displayName = 'proto.com.docker.api.protos.compose.v1.ComposeDownResponse';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of repeated fields within this message type.
|
||||||
|
* @private {!Array<number>}
|
||||||
|
* @const
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.repeatedFields_ = [3];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.compose.v1.ComposeUpRequest.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeUpRequest} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
projectname: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||||
|
workdir: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||||
|
filesList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeUpRequest}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.compose.v1.ComposeUpRequest;
|
||||||
|
return proto.com.docker.api.protos.compose.v1.ComposeUpRequest.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeUpRequest} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeUpRequest}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setProjectname(value);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setWorkdir(value);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.addFiles(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeUpRequest} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getProjectname();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
1,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getWorkdir();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
2,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getFilesList();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeRepeatedString(
|
||||||
|
3,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string projectName = 1;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.prototype.getProjectname = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeUpRequest} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.prototype.setProjectname = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string workDir = 2;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.prototype.getWorkdir = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeUpRequest} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.prototype.setWorkdir = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 2, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* repeated string files = 3;
|
||||||
|
* @return {!Array<string>}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.prototype.getFilesList = function() {
|
||||||
|
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!Array<string>} value
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeUpRequest} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.prototype.setFilesList = function(value) {
|
||||||
|
return jspb.Message.setField(this, 3, value || []);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @param {number=} opt_index
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeUpRequest} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.prototype.addFiles = function(value, opt_index) {
|
||||||
|
return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the list making it empty but non-null.
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeUpRequest} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpRequest.prototype.clearFilesList = function() {
|
||||||
|
return this.setFilesList([]);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpResponse.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.compose.v1.ComposeUpResponse.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeUpResponse} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpResponse.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeUpResponse}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpResponse.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.compose.v1.ComposeUpResponse;
|
||||||
|
return proto.com.docker.api.protos.compose.v1.ComposeUpResponse.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeUpResponse} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeUpResponse}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpResponse.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpResponse.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpResponse.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeUpResponse} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeUpResponse.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownRequest.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.compose.v1.ComposeDownRequest.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeDownRequest} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownRequest.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeDownRequest}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownRequest.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.compose.v1.ComposeDownRequest;
|
||||||
|
return proto.com.docker.api.protos.compose.v1.ComposeDownRequest.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeDownRequest} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeDownRequest}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownRequest.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownRequest.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownRequest.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeDownRequest} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownRequest.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownResponse.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.compose.v1.ComposeDownResponse.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeDownResponse} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownResponse.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeDownResponse}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownResponse.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.compose.v1.ComposeDownResponse;
|
||||||
|
return proto.com.docker.api.protos.compose.v1.ComposeDownResponse.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeDownResponse} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.compose.v1.ComposeDownResponse}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownResponse.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownResponse.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownResponse.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.compose.v1.ComposeDownResponse} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.compose.v1.ComposeDownResponse.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
goog.object.extend(exports, proto.com.docker.api.protos.compose.v1);
|
|
@ -0,0 +1,119 @@
|
||||||
|
/*
|
||||||
|
Copyright (c) 2020 Docker Inc.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person
|
||||||
|
obtaining a copy of this software and associated documentation
|
||||||
|
files (the "Software"), to deal in the Software without
|
||||||
|
restriction, including without limitation the rights to use, copy,
|
||||||
|
modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED,
|
||||||
|
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||||
|
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package com.docker.api.protos.containers.v1;
|
||||||
|
|
||||||
|
option go_package = "github.com/docker/api/protos/containers/v1;v1";
|
||||||
|
|
||||||
|
service Containers {
|
||||||
|
rpc List(ListRequest) returns (ListResponse);
|
||||||
|
rpc Stop(StopRequest) returns (StopResponse);
|
||||||
|
rpc Run(RunRequest) returns (RunResponse);
|
||||||
|
rpc Exec(ExecRequest) returns (ExecResponse);
|
||||||
|
rpc Logs(LogsRequest) returns (stream LogsResponse);
|
||||||
|
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
message Port {
|
||||||
|
uint32 host_port = 1;
|
||||||
|
uint32 container_port = 2;
|
||||||
|
string protocol = 3;
|
||||||
|
string host_ip = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Container {
|
||||||
|
string id = 1;
|
||||||
|
string image = 2;
|
||||||
|
string status = 3;
|
||||||
|
string command = 4;
|
||||||
|
uint64 cpu_time = 5;
|
||||||
|
uint64 memory_usage = 6;
|
||||||
|
uint64 memory_limit = 7;
|
||||||
|
uint64 pids_current = 8;
|
||||||
|
uint64 pids_limit = 9;
|
||||||
|
repeated string labels = 10;
|
||||||
|
repeated Port ports = 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteRequest {
|
||||||
|
string id = 1;
|
||||||
|
bool force = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
message StopRequest {
|
||||||
|
string id = 1;
|
||||||
|
uint32 timeout = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message StopResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
message RunRequest {
|
||||||
|
string id = 1;
|
||||||
|
string image = 2;
|
||||||
|
repeated Port ports = 3;
|
||||||
|
map<string, string> labels = 4;
|
||||||
|
repeated string volumes = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RunResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExecRequest {
|
||||||
|
string id = 1;
|
||||||
|
string command = 2;
|
||||||
|
string stream_id = 3;
|
||||||
|
repeated string args = 4;
|
||||||
|
repeated string env = 5;
|
||||||
|
bool tty = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExecResponse {
|
||||||
|
bytes output = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListRequest {
|
||||||
|
bool all = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListResponse {
|
||||||
|
repeated Container containers = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message LogsRequest {
|
||||||
|
string container_id = 1;
|
||||||
|
bool follow = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message LogsResponse {
|
||||||
|
bytes value = 1;
|
||||||
|
}
|
|
@ -0,0 +1,125 @@
|
||||||
|
// package: com.docker.api.protos.containers.v1
|
||||||
|
// file: containers/v1/containers.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as grpc from "@grpc/grpc-js";
|
||||||
|
import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call";
|
||||||
|
import * as containers_v1_containers_pb from "../../containers/v1/containers_pb";
|
||||||
|
|
||||||
|
interface IContainersService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
|
||||||
|
list: IContainersService_IList;
|
||||||
|
stop: IContainersService_IStop;
|
||||||
|
run: IContainersService_IRun;
|
||||||
|
exec: IContainersService_IExec;
|
||||||
|
logs: IContainersService_ILogs;
|
||||||
|
delete: IContainersService_IDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IContainersService_IList extends grpc.MethodDefinition<containers_v1_containers_pb.ListRequest, containers_v1_containers_pb.ListResponse> {
|
||||||
|
path: string; // "/com.docker.api.protos.containers.v1.Containers/List"
|
||||||
|
requestStream: boolean; // false
|
||||||
|
responseStream: boolean; // false
|
||||||
|
requestSerialize: grpc.serialize<containers_v1_containers_pb.ListRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.ListRequest>;
|
||||||
|
responseSerialize: grpc.serialize<containers_v1_containers_pb.ListResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.ListResponse>;
|
||||||
|
}
|
||||||
|
interface IContainersService_IStop extends grpc.MethodDefinition<containers_v1_containers_pb.StopRequest, containers_v1_containers_pb.StopResponse> {
|
||||||
|
path: string; // "/com.docker.api.protos.containers.v1.Containers/Stop"
|
||||||
|
requestStream: boolean; // false
|
||||||
|
responseStream: boolean; // false
|
||||||
|
requestSerialize: grpc.serialize<containers_v1_containers_pb.StopRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.StopRequest>;
|
||||||
|
responseSerialize: grpc.serialize<containers_v1_containers_pb.StopResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.StopResponse>;
|
||||||
|
}
|
||||||
|
interface IContainersService_IRun extends grpc.MethodDefinition<containers_v1_containers_pb.RunRequest, containers_v1_containers_pb.RunResponse> {
|
||||||
|
path: string; // "/com.docker.api.protos.containers.v1.Containers/Run"
|
||||||
|
requestStream: boolean; // false
|
||||||
|
responseStream: boolean; // false
|
||||||
|
requestSerialize: grpc.serialize<containers_v1_containers_pb.RunRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.RunRequest>;
|
||||||
|
responseSerialize: grpc.serialize<containers_v1_containers_pb.RunResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.RunResponse>;
|
||||||
|
}
|
||||||
|
interface IContainersService_IExec extends grpc.MethodDefinition<containers_v1_containers_pb.ExecRequest, containers_v1_containers_pb.ExecResponse> {
|
||||||
|
path: string; // "/com.docker.api.protos.containers.v1.Containers/Exec"
|
||||||
|
requestStream: boolean; // false
|
||||||
|
responseStream: boolean; // false
|
||||||
|
requestSerialize: grpc.serialize<containers_v1_containers_pb.ExecRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.ExecRequest>;
|
||||||
|
responseSerialize: grpc.serialize<containers_v1_containers_pb.ExecResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.ExecResponse>;
|
||||||
|
}
|
||||||
|
interface IContainersService_ILogs extends grpc.MethodDefinition<containers_v1_containers_pb.LogsRequest, containers_v1_containers_pb.LogsResponse> {
|
||||||
|
path: string; // "/com.docker.api.protos.containers.v1.Containers/Logs"
|
||||||
|
requestStream: boolean; // false
|
||||||
|
responseStream: boolean; // true
|
||||||
|
requestSerialize: grpc.serialize<containers_v1_containers_pb.LogsRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.LogsRequest>;
|
||||||
|
responseSerialize: grpc.serialize<containers_v1_containers_pb.LogsResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.LogsResponse>;
|
||||||
|
}
|
||||||
|
interface IContainersService_IDelete extends grpc.MethodDefinition<containers_v1_containers_pb.DeleteRequest, containers_v1_containers_pb.DeleteResponse> {
|
||||||
|
path: string; // "/com.docker.api.protos.containers.v1.Containers/Delete"
|
||||||
|
requestStream: boolean; // false
|
||||||
|
responseStream: boolean; // false
|
||||||
|
requestSerialize: grpc.serialize<containers_v1_containers_pb.DeleteRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.DeleteRequest>;
|
||||||
|
responseSerialize: grpc.serialize<containers_v1_containers_pb.DeleteResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.DeleteResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ContainersService: IContainersService;
|
||||||
|
|
||||||
|
export interface IContainersServer {
|
||||||
|
list: grpc.handleUnaryCall<containers_v1_containers_pb.ListRequest, containers_v1_containers_pb.ListResponse>;
|
||||||
|
stop: grpc.handleUnaryCall<containers_v1_containers_pb.StopRequest, containers_v1_containers_pb.StopResponse>;
|
||||||
|
run: grpc.handleUnaryCall<containers_v1_containers_pb.RunRequest, containers_v1_containers_pb.RunResponse>;
|
||||||
|
exec: grpc.handleUnaryCall<containers_v1_containers_pb.ExecRequest, containers_v1_containers_pb.ExecResponse>;
|
||||||
|
logs: grpc.handleServerStreamingCall<containers_v1_containers_pb.LogsRequest, containers_v1_containers_pb.LogsResponse>;
|
||||||
|
delete: grpc.handleUnaryCall<containers_v1_containers_pb.DeleteRequest, containers_v1_containers_pb.DeleteResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IContainersClient {
|
||||||
|
list(request: containers_v1_containers_pb.ListRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
list(request: containers_v1_containers_pb.ListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
list(request: containers_v1_containers_pb.ListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
stop(request: containers_v1_containers_pb.StopRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.StopResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
stop(request: containers_v1_containers_pb.StopRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.StopResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
stop(request: containers_v1_containers_pb.StopRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.StopResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
run(request: containers_v1_containers_pb.RunRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.RunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
run(request: containers_v1_containers_pb.RunRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.RunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
run(request: containers_v1_containers_pb.RunRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.RunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
exec(request: containers_v1_containers_pb.ExecRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ExecResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
exec(request: containers_v1_containers_pb.ExecRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ExecResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
exec(request: containers_v1_containers_pb.ExecRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ExecResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
logs(request: containers_v1_containers_pb.LogsRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<containers_v1_containers_pb.LogsResponse>;
|
||||||
|
logs(request: containers_v1_containers_pb.LogsRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<containers_v1_containers_pb.LogsResponse>;
|
||||||
|
delete(request: containers_v1_containers_pb.DeleteRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ContainersClient extends grpc.Client implements IContainersClient {
|
||||||
|
constructor(address: string, credentials: grpc.ChannelCredentials, options?: object);
|
||||||
|
public list(request: containers_v1_containers_pb.ListRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public list(request: containers_v1_containers_pb.ListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public list(request: containers_v1_containers_pb.ListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public stop(request: containers_v1_containers_pb.StopRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.StopResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public stop(request: containers_v1_containers_pb.StopRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.StopResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public stop(request: containers_v1_containers_pb.StopRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.StopResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public run(request: containers_v1_containers_pb.RunRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.RunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public run(request: containers_v1_containers_pb.RunRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.RunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public run(request: containers_v1_containers_pb.RunRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.RunResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public exec(request: containers_v1_containers_pb.ExecRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ExecResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public exec(request: containers_v1_containers_pb.ExecRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ExecResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public exec(request: containers_v1_containers_pb.ExecRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.ExecResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public logs(request: containers_v1_containers_pb.LogsRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<containers_v1_containers_pb.LogsResponse>;
|
||||||
|
public logs(request: containers_v1_containers_pb.LogsRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<containers_v1_containers_pb.LogsResponse>;
|
||||||
|
public delete(request: containers_v1_containers_pb.DeleteRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public delete(request: containers_v1_containers_pb.DeleteRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.DeleteResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
}
|
|
@ -0,0 +1,236 @@
|
||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
|
||||||
|
// Original file comments:
|
||||||
|
//
|
||||||
|
// Copyright (c) 2020 Docker Inc.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person
|
||||||
|
// obtaining a copy of this software and associated documentation
|
||||||
|
// files (the "Software"), to deal in the Software without
|
||||||
|
// restriction, including without limitation the rights to use, copy,
|
||||||
|
// modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
// of the Software, and to permit persons to whom the Software is
|
||||||
|
// furnished to do so, subject to the following conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be
|
||||||
|
// included in all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
// EXPRESS OR IMPLIED,
|
||||||
|
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
// HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
// DAMAGES OR OTHER LIABILITY,
|
||||||
|
// WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
// TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||||
|
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
'use strict';
|
||||||
|
var grpc = require('@grpc/grpc-js');
|
||||||
|
var containers_v1_containers_pb = require('../../containers/v1/containers_pb.js');
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_DeleteRequest(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.DeleteRequest)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.DeleteRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_DeleteRequest(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.DeleteRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_DeleteResponse(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.DeleteResponse)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.DeleteResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_DeleteResponse(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.DeleteResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_ExecRequest(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.ExecRequest)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.ExecRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_ExecRequest(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.ExecRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_ExecResponse(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.ExecResponse)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.ExecResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_ExecResponse(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.ExecResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_ListRequest(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.ListRequest)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.ListRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_ListRequest(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.ListRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_ListResponse(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.ListResponse)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.ListResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_ListResponse(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.ListResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_LogsRequest(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.LogsRequest)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.LogsRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_LogsRequest(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.LogsRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_LogsResponse(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.LogsResponse)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.LogsResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_LogsResponse(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.LogsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_RunRequest(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.RunRequest)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.RunRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_RunRequest(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.RunRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_RunResponse(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.RunResponse)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.RunResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_RunResponse(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.RunResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_StopRequest(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.StopRequest)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.StopRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_StopRequest(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.StopRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_containers_v1_StopResponse(arg) {
|
||||||
|
if (!(arg instanceof containers_v1_containers_pb.StopResponse)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.StopResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_containers_v1_StopResponse(buffer_arg) {
|
||||||
|
return containers_v1_containers_pb.StopResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var ContainersService = exports.ContainersService = {
|
||||||
|
list: {
|
||||||
|
path: '/com.docker.api.protos.containers.v1.Containers/List',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: containers_v1_containers_pb.ListRequest,
|
||||||
|
responseType: containers_v1_containers_pb.ListResponse,
|
||||||
|
requestSerialize: serialize_com_docker_api_protos_containers_v1_ListRequest,
|
||||||
|
requestDeserialize: deserialize_com_docker_api_protos_containers_v1_ListRequest,
|
||||||
|
responseSerialize: serialize_com_docker_api_protos_containers_v1_ListResponse,
|
||||||
|
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_ListResponse,
|
||||||
|
},
|
||||||
|
stop: {
|
||||||
|
path: '/com.docker.api.protos.containers.v1.Containers/Stop',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: containers_v1_containers_pb.StopRequest,
|
||||||
|
responseType: containers_v1_containers_pb.StopResponse,
|
||||||
|
requestSerialize: serialize_com_docker_api_protos_containers_v1_StopRequest,
|
||||||
|
requestDeserialize: deserialize_com_docker_api_protos_containers_v1_StopRequest,
|
||||||
|
responseSerialize: serialize_com_docker_api_protos_containers_v1_StopResponse,
|
||||||
|
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_StopResponse,
|
||||||
|
},
|
||||||
|
run: {
|
||||||
|
path: '/com.docker.api.protos.containers.v1.Containers/Run',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: containers_v1_containers_pb.RunRequest,
|
||||||
|
responseType: containers_v1_containers_pb.RunResponse,
|
||||||
|
requestSerialize: serialize_com_docker_api_protos_containers_v1_RunRequest,
|
||||||
|
requestDeserialize: deserialize_com_docker_api_protos_containers_v1_RunRequest,
|
||||||
|
responseSerialize: serialize_com_docker_api_protos_containers_v1_RunResponse,
|
||||||
|
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_RunResponse,
|
||||||
|
},
|
||||||
|
exec: {
|
||||||
|
path: '/com.docker.api.protos.containers.v1.Containers/Exec',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: containers_v1_containers_pb.ExecRequest,
|
||||||
|
responseType: containers_v1_containers_pb.ExecResponse,
|
||||||
|
requestSerialize: serialize_com_docker_api_protos_containers_v1_ExecRequest,
|
||||||
|
requestDeserialize: deserialize_com_docker_api_protos_containers_v1_ExecRequest,
|
||||||
|
responseSerialize: serialize_com_docker_api_protos_containers_v1_ExecResponse,
|
||||||
|
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_ExecResponse,
|
||||||
|
},
|
||||||
|
logs: {
|
||||||
|
path: '/com.docker.api.protos.containers.v1.Containers/Logs',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: true,
|
||||||
|
requestType: containers_v1_containers_pb.LogsRequest,
|
||||||
|
responseType: containers_v1_containers_pb.LogsResponse,
|
||||||
|
requestSerialize: serialize_com_docker_api_protos_containers_v1_LogsRequest,
|
||||||
|
requestDeserialize: deserialize_com_docker_api_protos_containers_v1_LogsRequest,
|
||||||
|
responseSerialize: serialize_com_docker_api_protos_containers_v1_LogsResponse,
|
||||||
|
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_LogsResponse,
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
path: '/com.docker.api.protos.containers.v1.Containers/Delete',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: containers_v1_containers_pb.DeleteRequest,
|
||||||
|
responseType: containers_v1_containers_pb.DeleteResponse,
|
||||||
|
requestSerialize: serialize_com_docker_api_protos_containers_v1_DeleteRequest,
|
||||||
|
requestDeserialize: deserialize_com_docker_api_protos_containers_v1_DeleteRequest,
|
||||||
|
responseSerialize: serialize_com_docker_api_protos_containers_v1_DeleteResponse,
|
||||||
|
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_DeleteResponse,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.ContainersClient = grpc.makeGenericClientConstructor(ContainersService);
|
|
@ -0,0 +1,409 @@
|
||||||
|
// package: com.docker.api.protos.containers.v1
|
||||||
|
// file: containers/v1/containers.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as jspb from "google-protobuf";
|
||||||
|
|
||||||
|
export class Port extends jspb.Message {
|
||||||
|
getHostPort(): number;
|
||||||
|
setHostPort(value: number): Port;
|
||||||
|
|
||||||
|
getContainerPort(): number;
|
||||||
|
setContainerPort(value: number): Port;
|
||||||
|
|
||||||
|
getProtocol(): string;
|
||||||
|
setProtocol(value: string): Port;
|
||||||
|
|
||||||
|
getHostIp(): string;
|
||||||
|
setHostIp(value: string): Port;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): Port.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: Port): Port.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: Port, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): Port;
|
||||||
|
static deserializeBinaryFromReader(message: Port, reader: jspb.BinaryReader): Port;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Port {
|
||||||
|
export type AsObject = {
|
||||||
|
hostPort: number,
|
||||||
|
containerPort: number,
|
||||||
|
protocol: string,
|
||||||
|
hostIp: string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Container extends jspb.Message {
|
||||||
|
getId(): string;
|
||||||
|
setId(value: string): Container;
|
||||||
|
|
||||||
|
getImage(): string;
|
||||||
|
setImage(value: string): Container;
|
||||||
|
|
||||||
|
getStatus(): string;
|
||||||
|
setStatus(value: string): Container;
|
||||||
|
|
||||||
|
getCommand(): string;
|
||||||
|
setCommand(value: string): Container;
|
||||||
|
|
||||||
|
getCpuTime(): number;
|
||||||
|
setCpuTime(value: number): Container;
|
||||||
|
|
||||||
|
getMemoryUsage(): number;
|
||||||
|
setMemoryUsage(value: number): Container;
|
||||||
|
|
||||||
|
getMemoryLimit(): number;
|
||||||
|
setMemoryLimit(value: number): Container;
|
||||||
|
|
||||||
|
getPidsCurrent(): number;
|
||||||
|
setPidsCurrent(value: number): Container;
|
||||||
|
|
||||||
|
getPidsLimit(): number;
|
||||||
|
setPidsLimit(value: number): Container;
|
||||||
|
|
||||||
|
clearLabelsList(): void;
|
||||||
|
getLabelsList(): Array<string>;
|
||||||
|
setLabelsList(value: Array<string>): Container;
|
||||||
|
addLabels(value: string, index?: number): string;
|
||||||
|
|
||||||
|
clearPortsList(): void;
|
||||||
|
getPortsList(): Array<Port>;
|
||||||
|
setPortsList(value: Array<Port>): Container;
|
||||||
|
addPorts(value?: Port, index?: number): Port;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): Container.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: Container): Container.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: Container, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): Container;
|
||||||
|
static deserializeBinaryFromReader(message: Container, reader: jspb.BinaryReader): Container;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Container {
|
||||||
|
export type AsObject = {
|
||||||
|
id: string,
|
||||||
|
image: string,
|
||||||
|
status: string,
|
||||||
|
command: string,
|
||||||
|
cpuTime: number,
|
||||||
|
memoryUsage: number,
|
||||||
|
memoryLimit: number,
|
||||||
|
pidsCurrent: number,
|
||||||
|
pidsLimit: number,
|
||||||
|
labelsList: Array<string>,
|
||||||
|
portsList: Array<Port.AsObject>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DeleteRequest extends jspb.Message {
|
||||||
|
getId(): string;
|
||||||
|
setId(value: string): DeleteRequest;
|
||||||
|
|
||||||
|
getForce(): boolean;
|
||||||
|
setForce(value: boolean): DeleteRequest;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): DeleteRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: DeleteRequest): DeleteRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: DeleteRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): DeleteRequest;
|
||||||
|
static deserializeBinaryFromReader(message: DeleteRequest, reader: jspb.BinaryReader): DeleteRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace DeleteRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
id: string,
|
||||||
|
force: boolean,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class DeleteResponse extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): DeleteResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: DeleteResponse): DeleteResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: DeleteResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): DeleteResponse;
|
||||||
|
static deserializeBinaryFromReader(message: DeleteResponse, reader: jspb.BinaryReader): DeleteResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace DeleteResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class StopRequest extends jspb.Message {
|
||||||
|
getId(): string;
|
||||||
|
setId(value: string): StopRequest;
|
||||||
|
|
||||||
|
getTimeout(): number;
|
||||||
|
setTimeout(value: number): StopRequest;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): StopRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: StopRequest): StopRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: StopRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): StopRequest;
|
||||||
|
static deserializeBinaryFromReader(message: StopRequest, reader: jspb.BinaryReader): StopRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace StopRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
id: string,
|
||||||
|
timeout: number,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class StopResponse extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): StopResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: StopResponse): StopResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: StopResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): StopResponse;
|
||||||
|
static deserializeBinaryFromReader(message: StopResponse, reader: jspb.BinaryReader): StopResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace StopResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class RunRequest extends jspb.Message {
|
||||||
|
getId(): string;
|
||||||
|
setId(value: string): RunRequest;
|
||||||
|
|
||||||
|
getImage(): string;
|
||||||
|
setImage(value: string): RunRequest;
|
||||||
|
|
||||||
|
clearPortsList(): void;
|
||||||
|
getPortsList(): Array<Port>;
|
||||||
|
setPortsList(value: Array<Port>): RunRequest;
|
||||||
|
addPorts(value?: Port, index?: number): Port;
|
||||||
|
|
||||||
|
|
||||||
|
getLabelsMap(): jspb.Map<string, string>;
|
||||||
|
clearLabelsMap(): void;
|
||||||
|
|
||||||
|
clearVolumesList(): void;
|
||||||
|
getVolumesList(): Array<string>;
|
||||||
|
setVolumesList(value: Array<string>): RunRequest;
|
||||||
|
addVolumes(value: string, index?: number): string;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): RunRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: RunRequest): RunRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: RunRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): RunRequest;
|
||||||
|
static deserializeBinaryFromReader(message: RunRequest, reader: jspb.BinaryReader): RunRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace RunRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
id: string,
|
||||||
|
image: string,
|
||||||
|
portsList: Array<Port.AsObject>,
|
||||||
|
|
||||||
|
labelsMap: Array<[string, string]>,
|
||||||
|
volumesList: Array<string>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class RunResponse extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): RunResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: RunResponse): RunResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: RunResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): RunResponse;
|
||||||
|
static deserializeBinaryFromReader(message: RunResponse, reader: jspb.BinaryReader): RunResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace RunResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ExecRequest extends jspb.Message {
|
||||||
|
getId(): string;
|
||||||
|
setId(value: string): ExecRequest;
|
||||||
|
|
||||||
|
getCommand(): string;
|
||||||
|
setCommand(value: string): ExecRequest;
|
||||||
|
|
||||||
|
getStreamId(): string;
|
||||||
|
setStreamId(value: string): ExecRequest;
|
||||||
|
|
||||||
|
clearArgsList(): void;
|
||||||
|
getArgsList(): Array<string>;
|
||||||
|
setArgsList(value: Array<string>): ExecRequest;
|
||||||
|
addArgs(value: string, index?: number): string;
|
||||||
|
|
||||||
|
clearEnvList(): void;
|
||||||
|
getEnvList(): Array<string>;
|
||||||
|
setEnvList(value: Array<string>): ExecRequest;
|
||||||
|
addEnv(value: string, index?: number): string;
|
||||||
|
|
||||||
|
getTty(): boolean;
|
||||||
|
setTty(value: boolean): ExecRequest;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ExecRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ExecRequest): ExecRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ExecRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ExecRequest;
|
||||||
|
static deserializeBinaryFromReader(message: ExecRequest, reader: jspb.BinaryReader): ExecRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ExecRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
id: string,
|
||||||
|
command: string,
|
||||||
|
streamId: string,
|
||||||
|
argsList: Array<string>,
|
||||||
|
envList: Array<string>,
|
||||||
|
tty: boolean,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ExecResponse extends jspb.Message {
|
||||||
|
getOutput(): Uint8Array | string;
|
||||||
|
getOutput_asU8(): Uint8Array;
|
||||||
|
getOutput_asB64(): string;
|
||||||
|
setOutput(value: Uint8Array | string): ExecResponse;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ExecResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ExecResponse): ExecResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ExecResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ExecResponse;
|
||||||
|
static deserializeBinaryFromReader(message: ExecResponse, reader: jspb.BinaryReader): ExecResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ExecResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
output: Uint8Array | string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ListRequest extends jspb.Message {
|
||||||
|
getAll(): boolean;
|
||||||
|
setAll(value: boolean): ListRequest;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ListRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ListRequest): ListRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ListRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ListRequest;
|
||||||
|
static deserializeBinaryFromReader(message: ListRequest, reader: jspb.BinaryReader): ListRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ListRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
all: boolean,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ListResponse extends jspb.Message {
|
||||||
|
clearContainersList(): void;
|
||||||
|
getContainersList(): Array<Container>;
|
||||||
|
setContainersList(value: Array<Container>): ListResponse;
|
||||||
|
addContainers(value?: Container, index?: number): Container;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ListResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ListResponse): ListResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ListResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ListResponse;
|
||||||
|
static deserializeBinaryFromReader(message: ListResponse, reader: jspb.BinaryReader): ListResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ListResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
containersList: Array<Container.AsObject>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class LogsRequest extends jspb.Message {
|
||||||
|
getContainerId(): string;
|
||||||
|
setContainerId(value: string): LogsRequest;
|
||||||
|
|
||||||
|
getFollow(): boolean;
|
||||||
|
setFollow(value: boolean): LogsRequest;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): LogsRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: LogsRequest): LogsRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: LogsRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): LogsRequest;
|
||||||
|
static deserializeBinaryFromReader(message: LogsRequest, reader: jspb.BinaryReader): LogsRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace LogsRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
containerId: string,
|
||||||
|
follow: boolean,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class LogsResponse extends jspb.Message {
|
||||||
|
getValue(): Uint8Array | string;
|
||||||
|
getValue_asU8(): Uint8Array;
|
||||||
|
getValue_asB64(): string;
|
||||||
|
setValue(value: Uint8Array | string): LogsResponse;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): LogsResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: LogsResponse): LogsResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: LogsResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): LogsResponse;
|
||||||
|
static deserializeBinaryFromReader(message: LogsResponse, reader: jspb.BinaryReader): LogsResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace LogsResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
value: Uint8Array | string,
|
||||||
|
}
|
||||||
|
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
Copyright (c) 2020 Docker Inc.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person
|
||||||
|
obtaining a copy of this software and associated documentation
|
||||||
|
files (the "Software"), to deal in the Software without
|
||||||
|
restriction, including without limitation the rights to use, copy,
|
||||||
|
modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED,
|
||||||
|
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||||
|
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package com.docker.api.protos.context.v1;
|
||||||
|
|
||||||
|
option go_package = "github.com/docker/api/protos/context/v1;v1";
|
||||||
|
|
||||||
|
service Contexts {
|
||||||
|
// Sets the current request for all calls
|
||||||
|
rpc SetCurrent(SetCurrentRequest) returns (SetCurrentResponse);
|
||||||
|
// Returns the list of existing contexts
|
||||||
|
rpc List(ListRequest) returns (ListResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
message Context {
|
||||||
|
string name = 1;
|
||||||
|
string contextType = 2;
|
||||||
|
bool current = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetCurrentRequest {
|
||||||
|
string name = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetCurrentResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListRequest {
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListResponse {
|
||||||
|
repeated Context contexts = 1;
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
// package: com.docker.api.protos.context.v1
|
||||||
|
// file: contexts/v1/contexts.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as grpc from "@grpc/grpc-js";
|
||||||
|
import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call";
|
||||||
|
import * as contexts_v1_contexts_pb from "../../contexts/v1/contexts_pb";
|
||||||
|
|
||||||
|
interface IContextsService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
|
||||||
|
setCurrent: IContextsService_ISetCurrent;
|
||||||
|
list: IContextsService_IList;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IContextsService_ISetCurrent extends grpc.MethodDefinition<contexts_v1_contexts_pb.SetCurrentRequest, contexts_v1_contexts_pb.SetCurrentResponse> {
|
||||||
|
path: string; // "/com.docker.api.protos.context.v1.Contexts/SetCurrent"
|
||||||
|
requestStream: boolean; // false
|
||||||
|
responseStream: boolean; // false
|
||||||
|
requestSerialize: grpc.serialize<contexts_v1_contexts_pb.SetCurrentRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<contexts_v1_contexts_pb.SetCurrentRequest>;
|
||||||
|
responseSerialize: grpc.serialize<contexts_v1_contexts_pb.SetCurrentResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<contexts_v1_contexts_pb.SetCurrentResponse>;
|
||||||
|
}
|
||||||
|
interface IContextsService_IList extends grpc.MethodDefinition<contexts_v1_contexts_pb.ListRequest, contexts_v1_contexts_pb.ListResponse> {
|
||||||
|
path: string; // "/com.docker.api.protos.context.v1.Contexts/List"
|
||||||
|
requestStream: boolean; // false
|
||||||
|
responseStream: boolean; // false
|
||||||
|
requestSerialize: grpc.serialize<contexts_v1_contexts_pb.ListRequest>;
|
||||||
|
requestDeserialize: grpc.deserialize<contexts_v1_contexts_pb.ListRequest>;
|
||||||
|
responseSerialize: grpc.serialize<contexts_v1_contexts_pb.ListResponse>;
|
||||||
|
responseDeserialize: grpc.deserialize<contexts_v1_contexts_pb.ListResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ContextsService: IContextsService;
|
||||||
|
|
||||||
|
export interface IContextsServer {
|
||||||
|
setCurrent: grpc.handleUnaryCall<contexts_v1_contexts_pb.SetCurrentRequest, contexts_v1_contexts_pb.SetCurrentResponse>;
|
||||||
|
list: grpc.handleUnaryCall<contexts_v1_contexts_pb.ListRequest, contexts_v1_contexts_pb.ListResponse>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IContextsClient {
|
||||||
|
setCurrent(request: contexts_v1_contexts_pb.SetCurrentRequest, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.SetCurrentResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
setCurrent(request: contexts_v1_contexts_pb.SetCurrentRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.SetCurrentResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
setCurrent(request: contexts_v1_contexts_pb.SetCurrentRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.SetCurrentResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
list(request: contexts_v1_contexts_pb.ListRequest, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
list(request: contexts_v1_contexts_pb.ListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
list(request: contexts_v1_contexts_pb.ListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ContextsClient extends grpc.Client implements IContextsClient {
|
||||||
|
constructor(address: string, credentials: grpc.ChannelCredentials, options?: object);
|
||||||
|
public setCurrent(request: contexts_v1_contexts_pb.SetCurrentRequest, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.SetCurrentResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public setCurrent(request: contexts_v1_contexts_pb.SetCurrentRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.SetCurrentResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public setCurrent(request: contexts_v1_contexts_pb.SetCurrentRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.SetCurrentResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public list(request: contexts_v1_contexts_pb.ListRequest, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public list(request: contexts_v1_contexts_pb.ListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
public list(request: contexts_v1_contexts_pb.ListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: contexts_v1_contexts_pb.ListResponse) => void): grpc.ClientUnaryCall;
|
||||||
|
}
|
|
@ -0,0 +1,106 @@
|
||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
|
||||||
|
// Original file comments:
|
||||||
|
//
|
||||||
|
// Copyright (c) 2020 Docker Inc.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person
|
||||||
|
// obtaining a copy of this software and associated documentation
|
||||||
|
// files (the "Software"), to deal in the Software without
|
||||||
|
// restriction, including without limitation the rights to use, copy,
|
||||||
|
// modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
// of the Software, and to permit persons to whom the Software is
|
||||||
|
// furnished to do so, subject to the following conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be
|
||||||
|
// included in all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
// EXPRESS OR IMPLIED,
|
||||||
|
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
// HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
// DAMAGES OR OTHER LIABILITY,
|
||||||
|
// WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
// TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||||
|
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
'use strict';
|
||||||
|
var grpc = require('@grpc/grpc-js');
|
||||||
|
var contexts_v1_contexts_pb = require('../../contexts/v1/contexts_pb.js');
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_context_v1_ListRequest(arg) {
|
||||||
|
if (!(arg instanceof contexts_v1_contexts_pb.ListRequest)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.context.v1.ListRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_context_v1_ListRequest(buffer_arg) {
|
||||||
|
return contexts_v1_contexts_pb.ListRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_context_v1_ListResponse(arg) {
|
||||||
|
if (!(arg instanceof contexts_v1_contexts_pb.ListResponse)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.context.v1.ListResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_context_v1_ListResponse(buffer_arg) {
|
||||||
|
return contexts_v1_contexts_pb.ListResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_context_v1_SetCurrentRequest(arg) {
|
||||||
|
if (!(arg instanceof contexts_v1_contexts_pb.SetCurrentRequest)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.context.v1.SetCurrentRequest');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_context_v1_SetCurrentRequest(buffer_arg) {
|
||||||
|
return contexts_v1_contexts_pb.SetCurrentRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_com_docker_api_protos_context_v1_SetCurrentResponse(arg) {
|
||||||
|
if (!(arg instanceof contexts_v1_contexts_pb.SetCurrentResponse)) {
|
||||||
|
throw new Error('Expected argument of type com.docker.api.protos.context.v1.SetCurrentResponse');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_com_docker_api_protos_context_v1_SetCurrentResponse(buffer_arg) {
|
||||||
|
return contexts_v1_contexts_pb.SetCurrentResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var ContextsService = exports.ContextsService = {
|
||||||
|
// Sets the current request for all calls
|
||||||
|
setCurrent: {
|
||||||
|
path: '/com.docker.api.protos.context.v1.Contexts/SetCurrent',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: contexts_v1_contexts_pb.SetCurrentRequest,
|
||||||
|
responseType: contexts_v1_contexts_pb.SetCurrentResponse,
|
||||||
|
requestSerialize: serialize_com_docker_api_protos_context_v1_SetCurrentRequest,
|
||||||
|
requestDeserialize: deserialize_com_docker_api_protos_context_v1_SetCurrentRequest,
|
||||||
|
responseSerialize: serialize_com_docker_api_protos_context_v1_SetCurrentResponse,
|
||||||
|
responseDeserialize: deserialize_com_docker_api_protos_context_v1_SetCurrentResponse,
|
||||||
|
},
|
||||||
|
// Returns the list of existing contexts
|
||||||
|
list: {
|
||||||
|
path: '/com.docker.api.protos.context.v1.Contexts/List',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: contexts_v1_contexts_pb.ListRequest,
|
||||||
|
responseType: contexts_v1_contexts_pb.ListResponse,
|
||||||
|
requestSerialize: serialize_com_docker_api_protos_context_v1_ListRequest,
|
||||||
|
requestDeserialize: deserialize_com_docker_api_protos_context_v1_ListRequest,
|
||||||
|
responseSerialize: serialize_com_docker_api_protos_context_v1_ListResponse,
|
||||||
|
responseDeserialize: deserialize_com_docker_api_protos_context_v1_ListResponse,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.ContextsClient = grpc.makeGenericClientConstructor(ContextsService);
|
|
@ -0,0 +1,114 @@
|
||||||
|
// package: com.docker.api.protos.context.v1
|
||||||
|
// file: contexts/v1/contexts.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as jspb from "google-protobuf";
|
||||||
|
|
||||||
|
export class Context extends jspb.Message {
|
||||||
|
getName(): string;
|
||||||
|
setName(value: string): Context;
|
||||||
|
|
||||||
|
getContexttype(): string;
|
||||||
|
setContexttype(value: string): Context;
|
||||||
|
|
||||||
|
getCurrent(): boolean;
|
||||||
|
setCurrent(value: boolean): Context;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): Context.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: Context): Context.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: Context, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): Context;
|
||||||
|
static deserializeBinaryFromReader(message: Context, reader: jspb.BinaryReader): Context;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace Context {
|
||||||
|
export type AsObject = {
|
||||||
|
name: string,
|
||||||
|
contexttype: string,
|
||||||
|
current: boolean,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SetCurrentRequest extends jspb.Message {
|
||||||
|
getName(): string;
|
||||||
|
setName(value: string): SetCurrentRequest;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): SetCurrentRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: SetCurrentRequest): SetCurrentRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: SetCurrentRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): SetCurrentRequest;
|
||||||
|
static deserializeBinaryFromReader(message: SetCurrentRequest, reader: jspb.BinaryReader): SetCurrentRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace SetCurrentRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
name: string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SetCurrentResponse extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): SetCurrentResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: SetCurrentResponse): SetCurrentResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: SetCurrentResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): SetCurrentResponse;
|
||||||
|
static deserializeBinaryFromReader(message: SetCurrentResponse, reader: jspb.BinaryReader): SetCurrentResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace SetCurrentResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ListRequest extends jspb.Message {
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ListRequest.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ListRequest): ListRequest.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ListRequest, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ListRequest;
|
||||||
|
static deserializeBinaryFromReader(message: ListRequest, reader: jspb.BinaryReader): ListRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ListRequest {
|
||||||
|
export type AsObject = {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ListResponse extends jspb.Message {
|
||||||
|
clearContextsList(): void;
|
||||||
|
getContextsList(): Array<Context>;
|
||||||
|
setContextsList(value: Array<Context>): ListResponse;
|
||||||
|
addContexts(value?: Context, index?: number): Context;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ListResponse.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ListResponse): ListResponse.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ListResponse, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ListResponse;
|
||||||
|
static deserializeBinaryFromReader(message: ListResponse, reader: jspb.BinaryReader): ListResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ListResponse {
|
||||||
|
export type AsObject = {
|
||||||
|
contextsList: Array<Context.AsObject>,
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,807 @@
|
||||||
|
// source: contexts/v1/contexts.proto
|
||||||
|
/**
|
||||||
|
* @fileoverview
|
||||||
|
* @enhanceable
|
||||||
|
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||||
|
* field starts with 'MSG_' and isn't a translatable message.
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
|
||||||
|
var jspb = require('google-protobuf');
|
||||||
|
var goog = jspb;
|
||||||
|
var global = Function('return this')();
|
||||||
|
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.context.v1.Context', null, global);
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.context.v1.ListRequest', null, global);
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.context.v1.ListResponse', null, global);
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.context.v1.SetCurrentRequest', null, global);
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.context.v1.SetCurrentResponse', null, global);
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.context.v1.Context, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.displayName = 'proto.com.docker.api.protos.context.v1.Context';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentRequest = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.context.v1.SetCurrentRequest, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentRequest.displayName = 'proto.com.docker.api.protos.context.v1.SetCurrentRequest';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentResponse = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.context.v1.SetCurrentResponse, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentResponse.displayName = 'proto.com.docker.api.protos.context.v1.SetCurrentResponse';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListRequest = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.context.v1.ListRequest, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListRequest.displayName = 'proto.com.docker.api.protos.context.v1.ListRequest';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.com.docker.api.protos.context.v1.ListResponse.repeatedFields_, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.context.v1.ListResponse, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.displayName = 'proto.com.docker.api.protos.context.v1.ListResponse';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.context.v1.Context.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.Context} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||||
|
contexttype: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||||
|
current: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.Context}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.context.v1.Context;
|
||||||
|
return proto.com.docker.api.protos.context.v1.Context.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.Context} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.Context}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setName(value);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setContexttype(value);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
var value = /** @type {boolean} */ (reader.readBool());
|
||||||
|
msg.setCurrent(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.Context} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getName();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
1,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getContexttype();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
2,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getCurrent();
|
||||||
|
if (f) {
|
||||||
|
writer.writeBool(
|
||||||
|
3,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string name = 1;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.prototype.getName = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.Context} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.prototype.setName = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string contextType = 2;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.prototype.getContexttype = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.Context} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.prototype.setContexttype = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 2, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bool current = 3;
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.prototype.getCurrent = function() {
|
||||||
|
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {boolean} value
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.Context} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.prototype.setCurrent = function(value) {
|
||||||
|
return jspb.Message.setProto3BooleanField(this, 3, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentRequest.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.context.v1.SetCurrentRequest.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.SetCurrentRequest} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentRequest.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
name: jspb.Message.getFieldWithDefault(msg, 1, "")
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.SetCurrentRequest}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentRequest.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.context.v1.SetCurrentRequest;
|
||||||
|
return proto.com.docker.api.protos.context.v1.SetCurrentRequest.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.SetCurrentRequest} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.SetCurrentRequest}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentRequest.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = /** @type {string} */ (reader.readString());
|
||||||
|
msg.setName(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentRequest.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentRequest.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.SetCurrentRequest} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentRequest.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getName();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeString(
|
||||||
|
1,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional string name = 1;
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentRequest.prototype.getName = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} value
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.SetCurrentRequest} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentRequest.prototype.setName = function(value) {
|
||||||
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentResponse.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.context.v1.SetCurrentResponse.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.SetCurrentResponse} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentResponse.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.SetCurrentResponse}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentResponse.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.context.v1.SetCurrentResponse;
|
||||||
|
return proto.com.docker.api.protos.context.v1.SetCurrentResponse.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.SetCurrentResponse} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.SetCurrentResponse}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentResponse.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentResponse.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentResponse.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.SetCurrentResponse} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.SetCurrentResponse.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListRequest.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.context.v1.ListRequest.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.ListRequest} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListRequest.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.ListRequest}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListRequest.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.context.v1.ListRequest;
|
||||||
|
return proto.com.docker.api.protos.context.v1.ListRequest.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.ListRequest} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.ListRequest}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListRequest.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListRequest.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.context.v1.ListRequest.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.ListRequest} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListRequest.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of repeated fields within this message type.
|
||||||
|
* @private {!Array<number>}
|
||||||
|
* @const
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.repeatedFields_ = [1];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.context.v1.ListResponse.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.ListResponse} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
contextsList: jspb.Message.toObjectList(msg.getContextsList(),
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.toObject, includeInstance)
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.ListResponse}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.context.v1.ListResponse;
|
||||||
|
return proto.com.docker.api.protos.context.v1.ListResponse.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.ListResponse} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.ListResponse}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = new proto.com.docker.api.protos.context.v1.Context;
|
||||||
|
reader.readMessage(value,proto.com.docker.api.protos.context.v1.Context.deserializeBinaryFromReader);
|
||||||
|
msg.addContexts(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.ListResponse} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getContextsList();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeRepeatedMessage(
|
||||||
|
1,
|
||||||
|
f,
|
||||||
|
proto.com.docker.api.protos.context.v1.Context.serializeBinaryToWriter
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* repeated Context contexts = 1;
|
||||||
|
* @return {!Array<!proto.com.docker.api.protos.context.v1.Context>}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.prototype.getContextsList = function() {
|
||||||
|
return /** @type{!Array<!proto.com.docker.api.protos.context.v1.Context>} */ (
|
||||||
|
jspb.Message.getRepeatedWrapperField(this, proto.com.docker.api.protos.context.v1.Context, 1));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!Array<!proto.com.docker.api.protos.context.v1.Context>} value
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.ListResponse} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.prototype.setContextsList = function(value) {
|
||||||
|
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!proto.com.docker.api.protos.context.v1.Context=} opt_value
|
||||||
|
* @param {number=} opt_index
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.Context}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.prototype.addContexts = function(opt_value, opt_index) {
|
||||||
|
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.com.docker.api.protos.context.v1.Context, opt_index);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the list making it empty but non-null.
|
||||||
|
* @return {!proto.com.docker.api.protos.context.v1.ListResponse} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.context.v1.ListResponse.prototype.clearContextsList = function() {
|
||||||
|
return this.setContextsList([]);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
goog.object.extend(exports, proto.com.docker.api.protos.context.v1);
|
|
@ -0,0 +1,31 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package com.docker.api.protos.streams.v1;
|
||||||
|
|
||||||
|
import "google/protobuf/any.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/docker/api/protos/streams/v1;v1";
|
||||||
|
|
||||||
|
service Streaming {
|
||||||
|
rpc NewStream(stream google.protobuf.Any) returns (stream google.protobuf.Any);
|
||||||
|
}
|
||||||
|
|
||||||
|
enum IOStream {
|
||||||
|
STDIN = 0;
|
||||||
|
STDOUT = 1;
|
||||||
|
STDERR = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BytesMessage {
|
||||||
|
IOStream type = 1;
|
||||||
|
bytes value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ResizeMessage {
|
||||||
|
uint32 width = 1;
|
||||||
|
uint32 height = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExitMessage {
|
||||||
|
uint32 status = 1;
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
// package: com.docker.api.protos.streams.v1
|
||||||
|
// file: streams/v1/streams.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as grpc from "@grpc/grpc-js";
|
||||||
|
import {handleClientStreamingCall} from "@grpc/grpc-js/build/src/server-call";
|
||||||
|
import * as streams_v1_streams_pb from "../../streams/v1/streams_pb";
|
||||||
|
import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb";
|
||||||
|
|
||||||
|
interface IStreamingService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
|
||||||
|
newStream: IStreamingService_INewStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IStreamingService_INewStream extends grpc.MethodDefinition<google_protobuf_any_pb.Any, google_protobuf_any_pb.Any> {
|
||||||
|
path: string; // "/com.docker.api.protos.streams.v1.Streaming/NewStream"
|
||||||
|
requestStream: boolean; // true
|
||||||
|
responseStream: boolean; // true
|
||||||
|
requestSerialize: grpc.serialize<google_protobuf_any_pb.Any>;
|
||||||
|
requestDeserialize: grpc.deserialize<google_protobuf_any_pb.Any>;
|
||||||
|
responseSerialize: grpc.serialize<google_protobuf_any_pb.Any>;
|
||||||
|
responseDeserialize: grpc.deserialize<google_protobuf_any_pb.Any>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const StreamingService: IStreamingService;
|
||||||
|
|
||||||
|
export interface IStreamingServer {
|
||||||
|
newStream: grpc.handleBidiStreamingCall<google_protobuf_any_pb.Any, google_protobuf_any_pb.Any>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IStreamingClient {
|
||||||
|
newStream(): grpc.ClientDuplexStream<google_protobuf_any_pb.Any, google_protobuf_any_pb.Any>;
|
||||||
|
newStream(options: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<google_protobuf_any_pb.Any, google_protobuf_any_pb.Any>;
|
||||||
|
newStream(metadata: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<google_protobuf_any_pb.Any, google_protobuf_any_pb.Any>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class StreamingClient extends grpc.Client implements IStreamingClient {
|
||||||
|
constructor(address: string, credentials: grpc.ChannelCredentials, options?: object);
|
||||||
|
public newStream(options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<google_protobuf_any_pb.Any, google_protobuf_any_pb.Any>;
|
||||||
|
public newStream(metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientDuplexStream<google_protobuf_any_pb.Any, google_protobuf_any_pb.Any>;
|
||||||
|
}
|
|
@ -0,0 +1,34 @@
|
||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
var grpc = require('@grpc/grpc-js');
|
||||||
|
var streams_v1_streams_pb = require('../../streams/v1/streams_pb.js');
|
||||||
|
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
|
||||||
|
|
||||||
|
function serialize_google_protobuf_Any(arg) {
|
||||||
|
if (!(arg instanceof google_protobuf_any_pb.Any)) {
|
||||||
|
throw new Error('Expected argument of type google.protobuf.Any');
|
||||||
|
}
|
||||||
|
return Buffer.from(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_google_protobuf_Any(buffer_arg) {
|
||||||
|
return google_protobuf_any_pb.Any.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var StreamingService = exports.StreamingService = {
|
||||||
|
newStream: {
|
||||||
|
path: '/com.docker.api.protos.streams.v1.Streaming/NewStream',
|
||||||
|
requestStream: true,
|
||||||
|
responseStream: true,
|
||||||
|
requestType: google_protobuf_any_pb.Any,
|
||||||
|
responseType: google_protobuf_any_pb.Any,
|
||||||
|
requestSerialize: serialize_google_protobuf_Any,
|
||||||
|
requestDeserialize: deserialize_google_protobuf_Any,
|
||||||
|
responseSerialize: serialize_google_protobuf_Any,
|
||||||
|
responseDeserialize: deserialize_google_protobuf_Any,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.StreamingClient = grpc.makeGenericClientConstructor(StreamingService);
|
|
@ -0,0 +1,87 @@
|
||||||
|
// package: com.docker.api.protos.streams.v1
|
||||||
|
// file: streams/v1/streams.proto
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
|
||||||
|
import * as jspb from "google-protobuf";
|
||||||
|
import * as google_protobuf_any_pb from "google-protobuf/google/protobuf/any_pb";
|
||||||
|
|
||||||
|
export class BytesMessage extends jspb.Message {
|
||||||
|
getType(): IOStream;
|
||||||
|
setType(value: IOStream): BytesMessage;
|
||||||
|
|
||||||
|
getValue(): Uint8Array | string;
|
||||||
|
getValue_asU8(): Uint8Array;
|
||||||
|
getValue_asB64(): string;
|
||||||
|
setValue(value: Uint8Array | string): BytesMessage;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): BytesMessage.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: BytesMessage): BytesMessage.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: BytesMessage, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): BytesMessage;
|
||||||
|
static deserializeBinaryFromReader(message: BytesMessage, reader: jspb.BinaryReader): BytesMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace BytesMessage {
|
||||||
|
export type AsObject = {
|
||||||
|
type: IOStream,
|
||||||
|
value: Uint8Array | string,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ResizeMessage extends jspb.Message {
|
||||||
|
getWidth(): number;
|
||||||
|
setWidth(value: number): ResizeMessage;
|
||||||
|
|
||||||
|
getHeight(): number;
|
||||||
|
setHeight(value: number): ResizeMessage;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ResizeMessage.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ResizeMessage): ResizeMessage.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ResizeMessage, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ResizeMessage;
|
||||||
|
static deserializeBinaryFromReader(message: ResizeMessage, reader: jspb.BinaryReader): ResizeMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ResizeMessage {
|
||||||
|
export type AsObject = {
|
||||||
|
width: number,
|
||||||
|
height: number,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ExitMessage extends jspb.Message {
|
||||||
|
getStatus(): number;
|
||||||
|
setStatus(value: number): ExitMessage;
|
||||||
|
|
||||||
|
|
||||||
|
serializeBinary(): Uint8Array;
|
||||||
|
toObject(includeInstance?: boolean): ExitMessage.AsObject;
|
||||||
|
static toObject(includeInstance: boolean, msg: ExitMessage): ExitMessage.AsObject;
|
||||||
|
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||||
|
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||||
|
static serializeBinaryToWriter(message: ExitMessage, writer: jspb.BinaryWriter): void;
|
||||||
|
static deserializeBinary(bytes: Uint8Array): ExitMessage;
|
||||||
|
static deserializeBinaryFromReader(message: ExitMessage, reader: jspb.BinaryReader): ExitMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
export namespace ExitMessage {
|
||||||
|
export type AsObject = {
|
||||||
|
status: number,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum IOStream {
|
||||||
|
STDIN = 0,
|
||||||
|
STDOUT = 1,
|
||||||
|
STDERR = 2,
|
||||||
|
}
|
|
@ -0,0 +1,567 @@
|
||||||
|
// source: streams/v1/streams.proto
|
||||||
|
/**
|
||||||
|
* @fileoverview
|
||||||
|
* @enhanceable
|
||||||
|
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
||||||
|
* field starts with 'MSG_' and isn't a translatable message.
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
|
||||||
|
var jspb = require('google-protobuf');
|
||||||
|
var goog = jspb;
|
||||||
|
var global = Function('return this')();
|
||||||
|
|
||||||
|
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
|
||||||
|
goog.object.extend(proto, google_protobuf_any_pb);
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.streams.v1.BytesMessage', null, global);
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.streams.v1.ExitMessage', null, global);
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.streams.v1.IOStream', null, global);
|
||||||
|
goog.exportSymbol('proto.com.docker.api.protos.streams.v1.ResizeMessage', null, global);
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.streams.v1.BytesMessage, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.displayName = 'proto.com.docker.api.protos.streams.v1.BytesMessage';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.streams.v1.ResizeMessage, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.displayName = 'proto.com.docker.api.protos.streams.v1.ResizeMessage';
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Generated by JsPbCodeGenerator.
|
||||||
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||||
|
* server response, or constructed directly in Javascript. The array is used
|
||||||
|
* in place and becomes part of the constructed object. It is not cloned.
|
||||||
|
* If no data is provided, the constructed object will be empty, but still
|
||||||
|
* valid.
|
||||||
|
* @extends {jspb.Message}
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ExitMessage = function(opt_data) {
|
||||||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||||
|
};
|
||||||
|
goog.inherits(proto.com.docker.api.protos.streams.v1.ExitMessage, jspb.Message);
|
||||||
|
if (goog.DEBUG && !COMPILED) {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ExitMessage.displayName = 'proto.com.docker.api.protos.streams.v1.ExitMessage';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.streams.v1.BytesMessage.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.streams.v1.BytesMessage} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
||||||
|
value: msg.getValue_asB64()
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.BytesMessage}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.streams.v1.BytesMessage;
|
||||||
|
return proto.com.docker.api.protos.streams.v1.BytesMessage.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.streams.v1.BytesMessage} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.BytesMessage}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = /** @type {!proto.com.docker.api.protos.streams.v1.IOStream} */ (reader.readEnum());
|
||||||
|
msg.setType(value);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
||||||
|
msg.setValue(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.streams.v1.BytesMessage} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getType();
|
||||||
|
if (f !== 0.0) {
|
||||||
|
writer.writeEnum(
|
||||||
|
1,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getValue_asU8();
|
||||||
|
if (f.length > 0) {
|
||||||
|
writer.writeBytes(
|
||||||
|
2,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional IOStream type = 1;
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.IOStream}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.prototype.getType = function() {
|
||||||
|
return /** @type {!proto.com.docker.api.protos.streams.v1.IOStream} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!proto.com.docker.api.protos.streams.v1.IOStream} value
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.BytesMessage} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.prototype.setType = function(value) {
|
||||||
|
return jspb.Message.setProto3EnumField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bytes value = 2;
|
||||||
|
* @return {!(string|Uint8Array)}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.prototype.getValue = function() {
|
||||||
|
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bytes value = 2;
|
||||||
|
* This is a type-conversion wrapper around `getValue()`
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.prototype.getValue_asB64 = function() {
|
||||||
|
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
||||||
|
this.getValue()));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional bytes value = 2;
|
||||||
|
* Note that Uint8Array is not supported on all browsers.
|
||||||
|
* @see http://caniuse.com/Uint8Array
|
||||||
|
* This is a type-conversion wrapper around `getValue()`
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.prototype.getValue_asU8 = function() {
|
||||||
|
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
||||||
|
this.getValue()));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {!(string|Uint8Array)} value
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.BytesMessage} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.BytesMessage.prototype.setValue = function(value) {
|
||||||
|
return jspb.Message.setProto3BytesField(this, 2, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.streams.v1.ResizeMessage.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.streams.v1.ResizeMessage} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
width: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
||||||
|
height: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.ResizeMessage}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.streams.v1.ResizeMessage;
|
||||||
|
return proto.com.docker.api.protos.streams.v1.ResizeMessage.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.streams.v1.ResizeMessage} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.ResizeMessage}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = /** @type {number} */ (reader.readUint32());
|
||||||
|
msg.setWidth(value);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
var value = /** @type {number} */ (reader.readUint32());
|
||||||
|
msg.setHeight(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.streams.v1.ResizeMessage} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getWidth();
|
||||||
|
if (f !== 0) {
|
||||||
|
writer.writeUint32(
|
||||||
|
1,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
f = message.getHeight();
|
||||||
|
if (f !== 0) {
|
||||||
|
writer.writeUint32(
|
||||||
|
2,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional uint32 width = 1;
|
||||||
|
* @return {number}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.prototype.getWidth = function() {
|
||||||
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {number} value
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.ResizeMessage} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.prototype.setWidth = function(value) {
|
||||||
|
return jspb.Message.setProto3IntField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional uint32 height = 2;
|
||||||
|
* @return {number}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.prototype.getHeight = function() {
|
||||||
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {number} value
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.ResizeMessage} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ResizeMessage.prototype.setHeight = function(value) {
|
||||||
|
return jspb.Message.setProto3IntField(this, 2, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||||
|
/**
|
||||||
|
* Creates an object representation of this proto.
|
||||||
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||||
|
* Optional fields that are not set will be set to undefined.
|
||||||
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||||
|
* For the list of reserved names please see:
|
||||||
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||||
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||||
|
* JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @return {!Object}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ExitMessage.prototype.toObject = function(opt_includeInstance) {
|
||||||
|
return proto.com.docker.api.protos.streams.v1.ExitMessage.toObject(opt_includeInstance, this);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Static version of the {@see toObject} method.
|
||||||
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||||
|
* the JSPB instance for transitional soy proto support:
|
||||||
|
* http://goto/soy-param-migration
|
||||||
|
* @param {!proto.com.docker.api.protos.streams.v1.ExitMessage} msg The msg instance to transform.
|
||||||
|
* @return {!Object}
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ExitMessage.toObject = function(includeInstance, msg) {
|
||||||
|
var f, obj = {
|
||||||
|
status: jspb.Message.getFieldWithDefault(msg, 1, 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
if (includeInstance) {
|
||||||
|
obj.$jspbMessageInstance = msg;
|
||||||
|
}
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format).
|
||||||
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.ExitMessage}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ExitMessage.deserializeBinary = function(bytes) {
|
||||||
|
var reader = new jspb.BinaryReader(bytes);
|
||||||
|
var msg = new proto.com.docker.api.protos.streams.v1.ExitMessage;
|
||||||
|
return proto.com.docker.api.protos.streams.v1.ExitMessage.deserializeBinaryFromReader(msg, reader);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deserializes binary data (in protobuf wire format) from the
|
||||||
|
* given reader into the given message object.
|
||||||
|
* @param {!proto.com.docker.api.protos.streams.v1.ExitMessage} msg The message object to deserialize into.
|
||||||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.ExitMessage}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ExitMessage.deserializeBinaryFromReader = function(msg, reader) {
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
var field = reader.getFieldNumber();
|
||||||
|
switch (field) {
|
||||||
|
case 1:
|
||||||
|
var value = /** @type {number} */ (reader.readUint32());
|
||||||
|
msg.setStatus(value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
reader.skipField();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the message to binary data (in protobuf wire format).
|
||||||
|
* @return {!Uint8Array}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ExitMessage.prototype.serializeBinary = function() {
|
||||||
|
var writer = new jspb.BinaryWriter();
|
||||||
|
proto.com.docker.api.protos.streams.v1.ExitMessage.serializeBinaryToWriter(this, writer);
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes the given message to binary data (in protobuf wire
|
||||||
|
* format), writing to the given BinaryWriter.
|
||||||
|
* @param {!proto.com.docker.api.protos.streams.v1.ExitMessage} message
|
||||||
|
* @param {!jspb.BinaryWriter} writer
|
||||||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ExitMessage.serializeBinaryToWriter = function(message, writer) {
|
||||||
|
var f = undefined;
|
||||||
|
f = message.getStatus();
|
||||||
|
if (f !== 0) {
|
||||||
|
writer.writeUint32(
|
||||||
|
1,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* optional uint32 status = 1;
|
||||||
|
* @return {number}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ExitMessage.prototype.getStatus = function() {
|
||||||
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {number} value
|
||||||
|
* @return {!proto.com.docker.api.protos.streams.v1.ExitMessage} returns this
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.ExitMessage.prototype.setStatus = function(value) {
|
||||||
|
return jspb.Message.setProto3IntField(this, 1, value);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @enum {number}
|
||||||
|
*/
|
||||||
|
proto.com.docker.api.protos.streams.v1.IOStream = {
|
||||||
|
STDIN: 0,
|
||||||
|
STDOUT: 1,
|
||||||
|
STDERR: 2
|
||||||
|
};
|
||||||
|
|
||||||
|
goog.object.extend(exports, proto.com.docker.api.protos.streams.v1);
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { sum } from '../src';
|
||||||
|
|
||||||
|
describe('blah', () => {
|
||||||
|
it('works', () => {
|
||||||
|
expect(sum(1, 1)).toEqual(2);
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"include": ["src", "types"],
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "ESNext",
|
||||||
|
"target": "ESNext",
|
||||||
|
"lib": ["esnext"],
|
||||||
|
"importHelpers": true,
|
||||||
|
"declaration": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"allowJs": true,
|
||||||
|
"rootDir": "./src",
|
||||||
|
"strict": true,
|
||||||
|
"outDir": "/dev/shm",
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"noImplicitReturns": true,
|
||||||
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"baseUrl": "./",
|
||||||
|
"paths": {
|
||||||
|
"*": ["src/*", "node_modules/*"]
|
||||||
|
},
|
||||||
|
"esModuleInterop": true
|
||||||
|
}
|
||||||
|
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче