-
Joscha Schmiedt authoredJoscha Schmiedt authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
scripting.h 1.62 KiB
/*
* This file is a part of the LinkAhead Project.
* Copyright (C) 2025 Joscha Schmiedt <joscha@schmiedt.dev>
* Copyright (C) 2025 IndiScale GmbH <info@indiscale.com>
*
* 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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "caosdb/scripting/v1alpha1/main.pb.h"
#include "caosdb/scripting/v1alpha1/main.grpc.pb.h"
#include <string>
#include <vector>
#include <grpcpp/grpcpp.h>
namespace linkahead::scripting {
using namespace caosdb::scripting::v1alpha1;
ExecuteServerSideScriptRequest construct_execute_server_side_script_request(
const std::string &script_name, const std::vector<std::string> &positional_arguments,
const std::vector<NamedArgument> &named_arguments, const std::vector<std::string> &script_files,
const std::string &auth_token, int timout_ms = 0, bool run_async = false);
ExecuteServerSideScriptResponse
call_server_side_script(const std::shared_ptr<grpc::Channel> &channel,
const ExecuteServerSideScriptRequest &request);
} // namespace linkahead::scripting