github.com/demonoid81/containerd@v1.3.4/api/services/namespaces/v1/namespace.proto (about)

     1  syntax = "proto3";
     2  
     3  package containerd.services.namespaces.v1;
     4  
     5  import weak "gogoproto/gogo.proto";
     6  import "google/protobuf/empty.proto";
     7  import "google/protobuf/field_mask.proto";
     8  
     9  option go_package = "github.com/containerd/containerd/api/services/namespaces/v1;namespaces";
    10  
    11  // Namespaces provides the ability to manipulate containerd namespaces.
    12  //
    13  // All objects in the system are required to be a member of a namespace. If a
    14  // namespace is deleted, all objects, including containers, images and
    15  // snapshots, will be deleted, as well.
    16  //
    17  // Unless otherwise noted, operations in containerd apply only to the namespace
    18  // supplied per request.
    19  //
    20  // I hope this goes without saying, but namespaces are themselves NOT
    21  // namespaced.
    22  service Namespaces {
    23  	rpc Get(GetNamespaceRequest) returns (GetNamespaceResponse);
    24  	rpc List(ListNamespacesRequest) returns (ListNamespacesResponse);
    25  	rpc Create(CreateNamespaceRequest) returns (CreateNamespaceResponse);
    26  	rpc Update(UpdateNamespaceRequest) returns (UpdateNamespaceResponse);
    27  	rpc Delete(DeleteNamespaceRequest) returns (google.protobuf.Empty);
    28  }
    29  
    30  message Namespace {
    31  	string name = 1;
    32  
    33  	// Labels provides an area to include arbitrary data on namespaces.
    34  	//
    35  	// The combined size of a key/value pair cannot exceed 4096 bytes.
    36  	//
    37  	// Note that to add a new value to this field, read the existing set and
    38  	// include the entire result in the update call.
    39  	map<string, string> labels  = 2;
    40  }
    41  
    42  message GetNamespaceRequest {
    43  	string name = 1;
    44  }
    45  
    46  message GetNamespaceResponse {
    47  	Namespace namespace = 1 [(gogoproto.nullable) = false];
    48  }
    49  
    50  message ListNamespacesRequest {
    51  	string filter = 1;
    52  }
    53  
    54  message ListNamespacesResponse {
    55  	repeated Namespace namespaces = 1 [(gogoproto.nullable) = false];
    56  }
    57  
    58  message CreateNamespaceRequest {
    59  	Namespace namespace = 1 [(gogoproto.nullable) = false];
    60  }
    61  
    62  message CreateNamespaceResponse {
    63  	Namespace namespace = 1 [(gogoproto.nullable) = false];
    64  }
    65  
    66  // UpdateNamespaceRequest updates the metadata for a namespace.
    67  //
    68  // The operation should follow semantics described in
    69  // https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask,
    70  // unless otherwise qualified.
    71  message UpdateNamespaceRequest {
    72  	// Namespace provides the target value, as declared by the mask, for the update.
    73  	//
    74  	// The namespace field must be set.
    75  	Namespace namespace = 1 [(gogoproto.nullable) = false];
    76  
    77  	// UpdateMask specifies which fields to perform the update on. If empty,
    78  	// the operation applies to all fields.
    79  	//
    80  	// For the most part, this applies only to selectively updating labels on
    81  	// the namespace. While field masks are typically limited to ascii alphas
    82  	// and digits, we just take everything after the "labels." as the map key.
    83  	google.protobuf.FieldMask update_mask = 2;
    84  }
    85  
    86  message UpdateNamespaceResponse {
    87  	Namespace namespace = 1 [(gogoproto.nullable) = false];
    88  }
    89  
    90  message DeleteNamespaceRequest {
    91  	string name = 1;
    92  }