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

     1  syntax = "proto3";
     2  
     3  package containerd.services.images.v1;
     4  
     5  import weak "gogoproto/gogo.proto";
     6  import "google/protobuf/empty.proto";
     7  import "google/protobuf/field_mask.proto";
     8  import "google/protobuf/timestamp.proto";
     9  import "github.com/containerd/containerd/api/types/descriptor.proto";
    10  
    11  option go_package = "github.com/containerd/containerd/api/services/images/v1;images";
    12  
    13  // Images is a service that allows one to register images with containerd.
    14  //
    15  // In containerd, an image is merely the mapping of a name to a content root,
    16  // described by a descriptor. The behavior and state of image is purely
    17  // dictated by the type of the descriptor.
    18  //
    19  // From the perspective of this service, these references are mostly shallow,
    20  // in that the existence of the required content won't be validated until
    21  // required by consuming services.
    22  //
    23  // As such, this can really be considered a "metadata service".
    24  service Images {
    25  	// Get returns an image by name.
    26  	rpc Get(GetImageRequest) returns (GetImageResponse);
    27  
    28  	// List returns a list of all images known to containerd.
    29  	rpc List(ListImagesRequest) returns (ListImagesResponse);
    30  
    31  	// Create an image record in the metadata store.
    32  	//
    33  	// The name of the image must be unique.
    34  	rpc Create(CreateImageRequest) returns (CreateImageResponse);
    35  
    36  	// Update assigns the name to a given target image based on the provided
    37  	// image.
    38  	rpc Update(UpdateImageRequest) returns (UpdateImageResponse);
    39  
    40  	// Delete deletes the image by name.
    41  	rpc Delete(DeleteImageRequest) returns (google.protobuf.Empty);
    42  }
    43  
    44  message Image {
    45  	// Name provides a unique name for the image.
    46  	//
    47  	// Containerd treats this as the primary identifier.
    48  	string name = 1;
    49  
    50  	// Labels provides free form labels for the image. These are runtime only
    51  	// and do not get inherited into the package image in any way.
    52  	//
    53  	// Labels may be updated using the field mask.
    54  	// The combined size of a key/value pair cannot exceed 4096 bytes.
    55  	map<string, string> labels = 2;
    56  
    57  	// Target describes the content entry point of the image.
    58  	containerd.types.Descriptor target = 3 [(gogoproto.nullable) = false];
    59  
    60  	// CreatedAt is the time the image was first created.
    61  	google.protobuf.Timestamp created_at = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
    62  
    63  	// UpdatedAt is the last time the image was mutated.
    64  	google.protobuf.Timestamp updated_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
    65  }
    66  
    67  message GetImageRequest {
    68  	string name = 1;
    69  }
    70  
    71  message GetImageResponse {
    72  	Image image = 1;
    73  }
    74  
    75  message CreateImageRequest {
    76  	Image image = 1 [(gogoproto.nullable) = false];
    77  }
    78  
    79  message CreateImageResponse {
    80  	Image image = 1 [(gogoproto.nullable) = false];
    81  }
    82  
    83  message UpdateImageRequest {
    84  	// Image provides a full or partial image for update.
    85  	//
    86  	// The name field must be set or an error will be returned.
    87  	Image image = 1 [(gogoproto.nullable) = false];
    88  
    89  	// UpdateMask specifies which fields to perform the update on. If empty,
    90  	// the operation applies to all fields.
    91  	google.protobuf.FieldMask update_mask = 2;
    92  }
    93  
    94  message UpdateImageResponse {
    95  	Image image = 1 [(gogoproto.nullable) = false];
    96  }
    97  
    98  message ListImagesRequest {
    99  	// Filters contains one or more filters using the syntax defined in the
   100  	// containerd filter package.
   101  	//
   102  	// The returned result will be those that match any of the provided
   103  	// filters. Expanded, images that match the following will be
   104  	// returned:
   105  	//
   106  	//   filters[0] or filters[1] or ... or filters[n-1] or filters[n]
   107  	//
   108  	// If filters is zero-length or nil, all items will be returned.
   109  	repeated string filters = 1;
   110  }
   111  
   112  message ListImagesResponse {
   113  	repeated Image images = 1 [(gogoproto.nullable) = false];
   114  }
   115  
   116  message DeleteImageRequest {
   117  	string name = 1;
   118  
   119  	// Sync indicates that the delete and cleanup should be done
   120  	// synchronously before returning to the caller
   121  	//
   122  	// Default is false
   123  	bool sync = 2;
   124  }