github.com/google/cadvisor@v0.49.1/third_party/containerd/api/services/namespaces/v1/namespace.proto (about) 1 /* 2 Copyright The containerd Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 syntax = "proto3"; 18 19 package containerd.services.namespaces.v1; 20 21 import weak "gogoproto/gogo.proto"; 22 import "google/protobuf/empty.proto"; 23 import "google/protobuf/field_mask.proto"; 24 25 option go_package = "github.com/containerd/containerd/api/services/namespaces/v1;namespaces"; 26 27 // Namespaces provides the ability to manipulate containerd namespaces. 28 // 29 // All objects in the system are required to be a member of a namespace. If a 30 // namespace is deleted, all objects, including containers, images and 31 // snapshots, will be deleted, as well. 32 // 33 // Unless otherwise noted, operations in containerd apply only to the namespace 34 // supplied per request. 35 // 36 // I hope this goes without saying, but namespaces are themselves NOT 37 // namespaced. 38 service Namespaces { 39 rpc Get(GetNamespaceRequest) returns (GetNamespaceResponse); 40 rpc List(ListNamespacesRequest) returns (ListNamespacesResponse); 41 rpc Create(CreateNamespaceRequest) returns (CreateNamespaceResponse); 42 rpc Update(UpdateNamespaceRequest) returns (UpdateNamespaceResponse); 43 rpc Delete(DeleteNamespaceRequest) returns (google.protobuf.Empty); 44 } 45 46 message Namespace { 47 string name = 1; 48 49 // Labels provides an area to include arbitrary data on namespaces. 50 // 51 // The combined size of a key/value pair cannot exceed 4096 bytes. 52 // 53 // Note that to add a new value to this field, read the existing set and 54 // include the entire result in the update call. 55 map<string, string> labels = 2; 56 } 57 58 message GetNamespaceRequest { 59 string name = 1; 60 } 61 62 message GetNamespaceResponse { 63 Namespace namespace = 1 [(gogoproto.nullable) = false]; 64 } 65 66 message ListNamespacesRequest { 67 string filter = 1; 68 } 69 70 message ListNamespacesResponse { 71 repeated Namespace namespaces = 1 [(gogoproto.nullable) = false]; 72 } 73 74 message CreateNamespaceRequest { 75 Namespace namespace = 1 [(gogoproto.nullable) = false]; 76 } 77 78 message CreateNamespaceResponse { 79 Namespace namespace = 1 [(gogoproto.nullable) = false]; 80 } 81 82 // UpdateNamespaceRequest updates the metadata for a namespace. 83 // 84 // The operation should follow semantics described in 85 // https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask, 86 // unless otherwise qualified. 87 message UpdateNamespaceRequest { 88 // Namespace provides the target value, as declared by the mask, for the update. 89 // 90 // The namespace field must be set. 91 Namespace namespace = 1 [(gogoproto.nullable) = false]; 92 93 // UpdateMask specifies which fields to perform the update on. If empty, 94 // the operation applies to all fields. 95 // 96 // For the most part, this applies only to selectively updating labels on 97 // the namespace. While field masks are typically limited to ascii alphas 98 // and digits, we just take everything after the "labels." as the map key. 99 google.protobuf.FieldMask update_mask = 2; 100 } 101 102 message UpdateNamespaceResponse { 103 Namespace namespace = 1 [(gogoproto.nullable) = false]; 104 } 105 106 message DeleteNamespaceRequest { 107 string name = 1; 108 }