/* Bicycle is a protobuf defined database framework. 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.sproc; import "google/protobuf/struct.proto"; message Empty {} message Name { string name = 1; } message Proc { string name = 1; bytes proc = 2; } message Procs { repeated Proc procs = 1; } message OneOff { bytes proc = 1; google.protobuf.Value args = 2; } message Stored { string name = 1; google.protobuf.Value args = 2; } service Sproc { rpc Remove(Name) returns (Empty) {} rpc Deploy(Proc) returns (Empty) {} rpc List(Empty) returns (Procs) {} rpc ExecOneOff(OneOff) returns (google.protobuf.Value) {} rpc ExecStored(Stored) returns (google.protobuf.Value) {} }