github.com/devseccon/trivy@v0.47.1-0.20231123133102-bd902a0bd996/rpc/cache/service.proto (about)

     1  syntax = "proto3";
     2  
     3  package trivy.cache.v1;
     4  option  go_package = "github.com/devseccon/trivy/rpc/cache;cache";
     5  
     6  import "google/protobuf/timestamp.proto";
     7  import "rpc/common/service.proto";
     8  import "google/protobuf/empty.proto";
     9  
    10  service Cache {
    11    rpc PutArtifact(PutArtifactRequest) returns (google.protobuf.Empty);
    12    rpc PutBlob(PutBlobRequest) returns (google.protobuf.Empty);
    13    rpc MissingBlobs(MissingBlobsRequest) returns (MissingBlobsResponse);
    14    rpc DeleteBlobs(DeleteBlobsRequest) returns (google.protobuf.Empty);
    15  }
    16  
    17  message ArtifactInfo {
    18    int32                     schema_version = 1;
    19    string                    architecture   = 2;
    20    google.protobuf.Timestamp created        = 3;
    21    string                    docker_version = 4;
    22    string                    os             = 5;
    23    repeated common.Package history_packages = 6;
    24  }
    25  
    26  message PutArtifactRequest {
    27    string       artifact_id   = 1;
    28    ArtifactInfo artifact_info = 2;
    29  }
    30  
    31  message BlobInfo {
    32    int32             schema_version                   = 1;
    33    common.OS         os                               = 2;
    34    common.Repository repository                       = 11;
    35    repeated common.PackageInfo package_infos          = 3;
    36    repeated common.Application applications           = 4;
    37    repeated common.Misconfiguration misconfigurations = 9;
    38    repeated string                  opaque_dirs       = 5;
    39    repeated string                  whiteout_files    = 6;
    40    string                           digest            = 7;
    41    string                           diff_id           = 8;
    42    repeated common.CustomResource custom_resources    = 10;
    43    repeated common.Secret secrets                     = 12;
    44    repeated common.LicenseFile licenses               = 13;
    45  }
    46  
    47  message PutBlobRequest {
    48    string   diff_id   = 1;
    49    BlobInfo blob_info = 3;
    50  }
    51  
    52  message PutResponse {
    53    common.OS os   = 1;
    54    bool      eosl = 2;
    55  }
    56  
    57  message MissingBlobsRequest {
    58    string          artifact_id = 1;
    59    repeated string blob_ids    = 2;
    60  }
    61  
    62  message MissingBlobsResponse {
    63    bool            missing_artifact = 1;
    64    repeated string missing_blob_ids = 2;
    65  }
    66  
    67  message DeleteBlobsRequest {
    68    repeated string blob_ids = 1;
    69  }