get.porter.sh/porter@v1.3.0/pkg/storage/plugins/proto/storage_protocol.proto (about)

     1  syntax = "proto3";
     2  package plugins;
     3  import "google/protobuf/struct.proto";
     4  
     5  option go_package = "get.porter.sh/porter/pkg/storage/plugins/proto";
     6  
     7  message EnsureIndexRequest {
     8    repeated Index Indices = 1;
     9  }
    10  
    11  message Index {
    12    string Collection = 1;
    13    repeated google.protobuf.Struct Keys = 2;
    14    bool Unique = 3;
    15  }
    16  
    17  message AggregateRequest {
    18    string Collection = 1;
    19    repeated Stage Pipeline = 2;
    20  }
    21  
    22  message Stage {
    23    repeated google.protobuf.Struct Steps = 1;
    24  }
    25  
    26  message CountRequest {
    27    string Collection = 1;
    28    google.protobuf.Struct Filter = 2;
    29  }
    30  
    31  message FindRequest {
    32    string Collection = 1;
    33    repeated google.protobuf.Struct Sort = 2;
    34    int64 Skip = 3;
    35    int64 Limit = 4;
    36    repeated google.protobuf.Struct Select = 5;
    37    google.protobuf.Struct Filter = 6;
    38  
    39    // The group field was removed
    40    reserved 7;
    41    reserved "group";
    42  
    43  }
    44  
    45  message InsertRequest {
    46    string Collection = 1;
    47    repeated google.protobuf.Struct Documents = 2;
    48  }
    49  
    50  message PatchRequest {
    51    string Collection = 1;
    52    google.protobuf.Struct QueryDocument = 2;
    53    repeated google.protobuf.Struct Transformation = 3;
    54  }
    55  
    56  message RemoveRequest {
    57    string Collection = 1;
    58    google.protobuf.Struct Filter = 2;
    59    bool All = 3;
    60  }
    61  
    62  message UpdateRequest {
    63    string Collection = 1;
    64    google.protobuf.Struct Filter = 2;
    65    bool Upsert = 3;
    66    google.protobuf.Struct Document = 4;
    67  }
    68  
    69  message EnsureIndexResponse {}
    70  
    71  message AggregateResponse {
    72    repeated bytes Results = 1;
    73  }
    74  
    75  message CountResponse {
    76    int64 Count = 1;
    77  }
    78  
    79  message FindResponse {
    80   repeated bytes Results = 1;
    81  }
    82  
    83  message InsertResponse {}
    84  
    85  message PatchResponse {}
    86  
    87  message RemoveResponse {}
    88  
    89  message UpdateResponse {}
    90  
    91  service StorageProtocol {
    92    rpc EnsureIndex(EnsureIndexRequest) returns (EnsureIndexResponse);
    93    rpc Aggregate(AggregateRequest) returns (AggregateResponse);
    94    rpc Count(CountRequest) returns (CountResponse);
    95    rpc Find(FindRequest) returns (FindResponse);
    96    rpc Insert(InsertRequest) returns (InsertResponse);
    97    rpc Patch(PatchRequest) returns (PatchResponse);
    98    rpc Remove(RemoveRequest) returns (RemoveResponse);
    99    rpc Update(UpdateRequest) returns (UpdateResponse);
   100  }