Merge pull request #35 from docker/update-license

Update license headers
This commit is contained in:
Guillaume Tardif 2020-09-25 09:49:44 +02:00 коммит произвёл GitHub
Родитель 2f9feb7009 6df1420258
Коммит 217f47c008
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
27 изменённых файлов: 532 добавлений и 18 удалений

Просмотреть файл

@ -1,4 +1,20 @@
# syntax = docker/dockerfile:experimental
# Copyright 2020 Docker CLI JavaScript SDK authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM node:12-buster-slim AS base
WORKDIR /src
COPY package.json .

Просмотреть файл

@ -1,3 +1,17 @@
# Copyright 2020 Docker Node SDK authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
export DOCKER_BUILDKIT=1
IMG?=node-sdk-test

2
NOTICE
Просмотреть файл

@ -1,2 +1,2 @@
Docker CLI JavaScript SDK
Copyright 2020 The Authors
Copyright 2020 Docker CLI JavaScript SDK authors

Просмотреть файл

@ -1,5 +1,5 @@
/*
Copyright 2020 The Authors
Copyright 2020 Docker CLI JavaScript SDK authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

Просмотреть файл

@ -1,5 +1,5 @@
/*
Copyright 2020 The Authors
Copyright 2020 Docker CLI JavaScript SDK authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

Просмотреть файл

@ -1,5 +1,5 @@
/*
Copyright 2020 The Authors
Copyright 2020 Docker CLI JavaScript SDK authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

Просмотреть файл

@ -1,5 +1,5 @@
/*
Copyright 2020 The Authors
Copyright 2020 Docker CLI JavaScript SDK authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

Просмотреть файл

@ -1,3 +1,19 @@
# Copyright 2020 Docker CLI JavaScript SDK authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash
node_modules/.bin/grpc_tools_node_protoc \
--js_out=import_style=commonjs,binary:./src/protos \
--grpc_out=grpc_js:./src/protos \

Просмотреть файл

@ -1,3 +1,17 @@
# Copyright 2020 Docker CLI JavaScript SDK authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash
set -e

Просмотреть файл

@ -1,3 +1,19 @@
/*
Copyright 2020 Docker CLI JavaScript SDK authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import * as fs from 'fs';
import * as path from 'path';
import * as tar from 'tar';

Просмотреть файл

@ -1,3 +1,19 @@
/*
Copyright 2020 Docker CLI JavaScript SDK authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import * as fs from 'fs';
import * as path from 'path';
import { Readable } from 'stream';

Просмотреть файл

@ -1,5 +1,5 @@
/*
Copyright 2020 The Authors
Copyright 2020 Docker CLI JavaScript SDK authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

Просмотреть файл

@ -1,5 +1,5 @@
/*
Copyright 2020 The Authors
Copyright 2020 Docker CLI JavaScript SDK authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

Просмотреть файл

@ -1,5 +1,5 @@
/*
Copyright 2020 The Authors
Copyright 2020 Docker CLI JavaScript SDK authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

Просмотреть файл

@ -1,5 +1,5 @@
//
// Copyright 2020 Docker, Inc.
// Copyright 2020 Docker Compose CLI authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

Просмотреть файл

@ -2,7 +2,7 @@
// Original file comments:
//
// Copyright 2020 Docker, Inc.
// Copyright 2020 Docker Compose CLI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

Просмотреть файл

@ -1,5 +1,5 @@
//
// Copyright 2020 Docker, Inc.
// Copyright 2020 Docker Compose CLI authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -23,6 +23,7 @@ service Containers {
rpc List(ListRequest) returns (ListResponse);
rpc Start(StartRequest) returns (StartResponse);
rpc Stop(StopRequest) returns (StopResponse);
rpc Kill(KillRequest) returns (KillResponse);
rpc Run(RunRequest) returns (RunResponse);
rpc Exec(ExecRequest) returns (ExecResponse);
rpc Logs(LogsRequest) returns (stream LogsResponse);
@ -85,6 +86,14 @@ message StopRequest {
message StopResponse {
}
message KillRequest {
string id = 1;
string signal = 2;
}
message KillResponse {
}
message RunRequest {
string id = 1;
string image = 2;
@ -93,7 +102,7 @@ message RunRequest {
repeated string volumes = 5;
uint64 memory_limit = 6;
uint64 cpu_limit = 7;
string restart_policy_condition= 8;
string restart_policy_condition = 8;
}
message RunResponse {

Просмотреть файл

@ -12,6 +12,7 @@ interface IContainersService extends grpc.ServiceDefinition<grpc.UntypedServiceI
list: IContainersService_IList;
start: IContainersService_IStart;
stop: IContainersService_IStop;
kill: IContainersService_IKill;
run: IContainersService_IRun;
exec: IContainersService_IExec;
logs: IContainersService_ILogs;
@ -46,6 +47,15 @@ interface IContainersService_IStop extends grpc.MethodDefinition<containers_v1_c
responseSerialize: grpc.serialize<containers_v1_containers_pb.StopResponse>;
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.StopResponse>;
}
interface IContainersService_IKill extends grpc.MethodDefinition<containers_v1_containers_pb.KillRequest, containers_v1_containers_pb.KillResponse> {
path: string; // "/com.docker.api.protos.containers.v1.Containers/Kill"
requestStream: false;
responseStream: false;
requestSerialize: grpc.serialize<containers_v1_containers_pb.KillRequest>;
requestDeserialize: grpc.deserialize<containers_v1_containers_pb.KillRequest>;
responseSerialize: grpc.serialize<containers_v1_containers_pb.KillResponse>;
responseDeserialize: grpc.deserialize<containers_v1_containers_pb.KillResponse>;
}
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: false;
@ -98,6 +108,7 @@ export interface IContainersServer {
list: grpc.handleUnaryCall<containers_v1_containers_pb.ListRequest, containers_v1_containers_pb.ListResponse>;
start: grpc.handleUnaryCall<containers_v1_containers_pb.StartRequest, containers_v1_containers_pb.StartResponse>;
stop: grpc.handleUnaryCall<containers_v1_containers_pb.StopRequest, containers_v1_containers_pb.StopResponse>;
kill: grpc.handleUnaryCall<containers_v1_containers_pb.KillRequest, containers_v1_containers_pb.KillResponse>;
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>;
@ -115,6 +126,9 @@ export interface IContainersClient {
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;
kill(request: containers_v1_containers_pb.KillRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.KillResponse) => void): grpc.ClientUnaryCall;
kill(request: containers_v1_containers_pb.KillRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.KillResponse) => void): grpc.ClientUnaryCall;
kill(request: containers_v1_containers_pb.KillRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.KillResponse) => 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;
@ -142,6 +156,9 @@ export class ContainersClient extends grpc.Client implements IContainersClient {
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 kill(request: containers_v1_containers_pb.KillRequest, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.KillResponse) => void): grpc.ClientUnaryCall;
public kill(request: containers_v1_containers_pb.KillRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.KillResponse) => void): grpc.ClientUnaryCall;
public kill(request: containers_v1_containers_pb.KillRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: containers_v1_containers_pb.KillResponse) => 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;

Просмотреть файл

@ -2,7 +2,7 @@
// Original file comments:
//
// Copyright 2020 Docker, Inc.
// Copyright 2020 Docker Compose CLI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -86,6 +86,28 @@ function deserialize_com_docker_api_protos_containers_v1_InspectResponse(buffer_
return containers_v1_containers_pb.InspectResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_com_docker_api_protos_containers_v1_KillRequest(arg) {
if (!(arg instanceof containers_v1_containers_pb.KillRequest)) {
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.KillRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_com_docker_api_protos_containers_v1_KillRequest(buffer_arg) {
return containers_v1_containers_pb.KillRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_com_docker_api_protos_containers_v1_KillResponse(arg) {
if (!(arg instanceof containers_v1_containers_pb.KillResponse)) {
throw new Error('Expected argument of type com.docker.api.protos.containers.v1.KillResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_com_docker_api_protos_containers_v1_KillResponse(buffer_arg) {
return containers_v1_containers_pb.KillResponse.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');
@ -231,6 +253,17 @@ var ContainersService = exports.ContainersService = {
responseSerialize: serialize_com_docker_api_protos_containers_v1_StopResponse,
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_StopResponse,
},
kill: {
path: '/com.docker.api.protos.containers.v1.Containers/Kill',
requestStream: false,
responseStream: false,
requestType: containers_v1_containers_pb.KillRequest,
responseType: containers_v1_containers_pb.KillResponse,
requestSerialize: serialize_com_docker_api_protos_containers_v1_KillRequest,
requestDeserialize: deserialize_com_docker_api_protos_containers_v1_KillRequest,
responseSerialize: serialize_com_docker_api_protos_containers_v1_KillResponse,
responseDeserialize: deserialize_com_docker_api_protos_containers_v1_KillResponse,
},
run: {
path: '/com.docker.api.protos.containers.v1.Containers/Run',
requestStream: false,

42
src/protos/containers/v1/containers_pb.d.ts поставляемый
Просмотреть файл

@ -283,6 +283,48 @@ export namespace StopResponse {
}
}
export class KillRequest extends jspb.Message {
getId(): string;
setId(value: string): KillRequest;
getSignal(): string;
setSignal(value: string): KillRequest;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): KillRequest.AsObject;
static toObject(includeInstance: boolean, msg: KillRequest): KillRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: KillRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): KillRequest;
static deserializeBinaryFromReader(message: KillRequest, reader: jspb.BinaryReader): KillRequest;
}
export namespace KillRequest {
export type AsObject = {
id: string,
signal: string,
}
}
export class KillResponse extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): KillResponse.AsObject;
static toObject(includeInstance: boolean, msg: KillResponse): KillResponse.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static serializeBinaryToWriter(message: KillResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): KillResponse;
static deserializeBinaryFromReader(message: KillResponse, reader: jspb.BinaryReader): KillResponse;
}
export namespace KillResponse {
export type AsObject = {
}
}
export class RunRequest extends jspb.Message {
getId(): string;
setId(value: string): RunRequest;

Просмотреть файл

@ -19,6 +19,8 @@ goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ExecRequest', null,
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ExecResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.InspectRequest', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.InspectResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.KillRequest', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.KillResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ListRequest', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.ListResponse', null, global);
goog.exportSymbol('proto.com.docker.api.protos.containers.v1.LogsRequest', null, global);
@ -240,6 +242,48 @@ if (goog.DEBUG && !COMPILED) {
*/
proto.com.docker.api.protos.containers.v1.StopResponse.displayName = 'proto.com.docker.api.protos.containers.v1.StopResponse';
}
/**
* 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.containers.v1.KillRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.com.docker.api.protos.containers.v1.KillRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.com.docker.api.protos.containers.v1.KillRequest.displayName = 'proto.com.docker.api.protos.containers.v1.KillRequest';
}
/**
* 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.containers.v1.KillResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.com.docker.api.protos.containers.v1.KillResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.com.docker.api.protos.containers.v1.KillResponse.displayName = 'proto.com.docker.api.protos.containers.v1.KillResponse';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
@ -2232,6 +2276,267 @@ proto.com.docker.api.protos.containers.v1.StopResponse.serializeBinaryToWriter =
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.containers.v1.KillRequest.prototype.toObject = function(opt_includeInstance) {
return proto.com.docker.api.protos.containers.v1.KillRequest.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.containers.v1.KillRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.KillRequest.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
signal: jspb.Message.getFieldWithDefault(msg, 2, "")
};
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.containers.v1.KillRequest}
*/
proto.com.docker.api.protos.containers.v1.KillRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.com.docker.api.protos.containers.v1.KillRequest;
return proto.com.docker.api.protos.containers.v1.KillRequest.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.containers.v1.KillRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.com.docker.api.protos.containers.v1.KillRequest}
*/
proto.com.docker.api.protos.containers.v1.KillRequest.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.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setSignal(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.containers.v1.KillRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.com.docker.api.protos.containers.v1.KillRequest.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.containers.v1.KillRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.KillRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getSignal();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.com.docker.api.protos.containers.v1.KillRequest.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.com.docker.api.protos.containers.v1.KillRequest} returns this
*/
proto.com.docker.api.protos.containers.v1.KillRequest.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string signal = 2;
* @return {string}
*/
proto.com.docker.api.protos.containers.v1.KillRequest.prototype.getSignal = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.com.docker.api.protos.containers.v1.KillRequest} returns this
*/
proto.com.docker.api.protos.containers.v1.KillRequest.prototype.setSignal = function(value) {
return jspb.Message.setProto3StringField(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.containers.v1.KillResponse.prototype.toObject = function(opt_includeInstance) {
return proto.com.docker.api.protos.containers.v1.KillResponse.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.containers.v1.KillResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.KillResponse.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.containers.v1.KillResponse}
*/
proto.com.docker.api.protos.containers.v1.KillResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.com.docker.api.protos.containers.v1.KillResponse;
return proto.com.docker.api.protos.containers.v1.KillResponse.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.containers.v1.KillResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.com.docker.api.protos.containers.v1.KillResponse}
*/
proto.com.docker.api.protos.containers.v1.KillResponse.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.containers.v1.KillResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.com.docker.api.protos.containers.v1.KillResponse.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.containers.v1.KillResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.com.docker.api.protos.containers.v1.KillResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}

Просмотреть файл

@ -1,5 +1,5 @@
//
// Copyright 2020 Docker, Inc.
// Copyright 2020 Docker Compose CLI authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

Просмотреть файл

@ -2,7 +2,7 @@
// Original file comments:
//
// Copyright 2020 Docker, Inc.
// Copyright 2020 Docker Compose CLI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

Просмотреть файл

@ -1,5 +1,5 @@
//
// Copyright 2020 Docker, Inc.
// Copyright 2020 Docker Compose CLI authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

Просмотреть файл

@ -2,7 +2,7 @@
// Original file comments:
//
// Copyright 2020 Docker, Inc.
// Copyright 2020 Docker Compose CLI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.

Просмотреть файл

@ -1,5 +1,5 @@
/*
Copyright 2020 The Authors
Copyright 2020 Docker CLI JavaScript SDK authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

Просмотреть файл

@ -1,3 +1,19 @@
/*
Copyright 2020 Docker CLI JavaScript SDK authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
const fs = require('fs');
const path = require('path');
const { spawn } = require('child_process');