/* BicycleDB is a protobuf-defined database management system. Copyright (C) 2024 Ordinary Labs This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ syntax = "proto3"; package bicycle; import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; // ##MODEL_MESSAGES_START## message Examples { repeated Example examples = 1; } message Example { string pk = 1; } // ##MODEL_MESSAGES_END## message IndexQuery { oneof expression { string eq = 1; string gte = 2; string lte = 3; string begins_with = 4; } } // Server Messages service Bicycle { // ##MODEL_RPCS_START## rpc GetExamplesByPk(IndexQuery) returns (Examples) {} rpc DeleteExamplesByPk(IndexQuery) returns (google.protobuf.Empty) {} rpc PutExample(Example) returns (google.protobuf.Empty) {} rpc BatchPutExamples(Examples) returns (google.protobuf.Empty) {} // ##MODEL_RPCS_END## } // SPROCS message FnName { string name = 1; } message Fn { string name = 1; bytes function = 2; } message Fns { repeated Fn functions = 1; } message OneOff { bytes function = 1; google.protobuf.Value args = 2; } message Stored { string name = 1; google.protobuf.Value args = 2; } service Biplane { rpc Remove(FnName) returns (google.protobuf.Empty) {} rpc Deploy(Fn) returns (google.protobuf.Empty) {} rpc List(google.protobuf.Empty) returns (Fns) {} rpc InvokeOneOff(OneOff) returns (google.protobuf.Value) {} rpc InvokeStored(Stored) returns (google.protobuf.Value) {} }