Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
Go to the documentation of this file.
23 #ifndef CORE_SERVER_SERVER_INCLUDE_GRASSROOTS_SERVER_H_
24 #define CORE_SERVER_SERVER_INCLUDE_GRASSROOTS_SERVER_H_
41 struct MongoClientManager;
126 const char *jobs_managers_path_s,
const char *servers_managers_path_s,
struct JobsManager *external_jobs_manager_p,
MEM_FLAG jobs_manager_flag,
struct ServersManager *external_servers_manager_p,
MEM_FLAG servers_manager_flag);
315 const char *operation_name_s,
User *user_p);
void ConnectToExternalServers(GrassrootsServer *server_p)
Connect to any defined separate Grassroots servers.
struct JobsManager * gs_jobs_manager_p
Definition: grassroots_server.h:93
A datatype for monitoring ExternalServers.
Definition: servers_manager.h:141
This is a datatype to store the versioning details for the Grassroots JSON schema that is being used.
Definition: schema_version.h:44
json_t * ProcessServerJSONMessage(GrassrootsServer *grassroots_p, json_t *json_req_p, User *user_p, const char **error_ss)
Process a given JSON request and produce the server response.
User * GetUserByEmailAddress(const GrassrootsServer *grassroots_p, const char *email_s)
Get an existing User by the email address.
MEM_FLAG
An enum specifying the particular status of a piece of dynamically allocated memory for a particular ...
Definition: memory_allocations.h:38
bool SetGrassrootsServerConfig(GrassrootsServer *server_p, const char *config_filename_s)
json_t * gs_config_p
Definition: grassroots_server.h:101
const char * GetServerRootDirectory(const GrassrootsServer *const grassroots_p)
A datatype for monitoring ServiceJobs.
Definition: jobs_manager.h:98
A datatype representing a URI.
Definition: data_resource.h:40
struct Service * GetServiceByName(GrassrootsServer *grassroots_p, const char *const service_name_s, const char *const service_alias_s)
Get a Service by its name.
GrassrootsServer * AllocateGrassrootsServer(const char *grassroots_path_s, const char *config_filename_s, const char *service_config_path_s, const char *services_path_s, const char *references_path_s, const char *jobs_managers_path_s, const char *servers_managers_path_s, struct JobsManager *external_jobs_manager_p, MEM_FLAG jobs_manager_flag, struct ServersManager *external_servers_manager_p, MEM_FLAG servers_manager_flag)
Allocate a GrassrootsServer.
MEM_FLAG gs_servers_manager_mem
Definition: grassroots_server.h:99
void LoadMatchingServices(GrassrootsServer *grassroots_p, LinkedList *services_p, DataResource *resource_p, Handler *handler_p, User *user_p)
Load the Services that are able to act upon a given Resource.
bool IsServiceEnabled(const GrassrootsServer *grassroots_p, const char *service_name_s)
Check if a named Service is enabled upon this Grassroots server.
struct MongoClientManager * gs_mongo_manager_p
Definition: grassroots_server.h:105
User * GetUserById(const GrassrootsServer *grassroots_p, const bson_oid_t *id_p)
Get an existing User by the id.
char * gs_path_s
The path to the root directory for this GrassrootsServer.
Definition: grassroots_server.h:50
void LoadMatchingServicesByName(GrassrootsServer *grassroots_p, LinkedList *services_p, const char *service_name_s, const char *service_alias_s, User *user_p)
Load the Service that matches a given service name.
LinkedList * GetAllUsers(const GrassrootsServer *grassroots_p)
Get a list of all Users.
A datatype which defines an available service, its capabilities and its parameters.
Definition: service.h:153
const char * GetServerProviderName(const GrassrootsServer *grassroots_p)
Get the Provider name for this Grassroots Server.
json_t * GetGlobalConfigValue(const GrassrootsServer *grassroots_p, const char *key_s)
Get a configuration value from the global Grassroots configuration file.
char * gs_services_path_s
The relative path from gs_path_s to the folder containing the service modules.
Definition: grassroots_server.h:75
char * gs_references_path_s
The relative path from gs_path_s to the folder containing the reference services.
Definition: grassroots_server.h:69
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
bool InitGrassrootsServer(GrassrootsServer *server_p)
const SchemaVersion * GetSchemaVersion(GrassrootsServer *server_p)
MEM_FLAG gs_jobs_manager_mem
Definition: grassroots_server.h:95
char * gs_servers_managers_path_s
The relative path from gs_path_s to the folder containing the servers managers modules.
Definition: grassroots_server.h:89
SchemaVersion * gs_schema_version_p
Definition: grassroots_server.h:103
#define GRASSROOTS_SERVICE_MANAGER_LOCAL
Definition: grassroots_service_manager_library.h:47
void LoadKeywordServices(GrassrootsServer *grassroots_p, LinkedList *services_p, User *user_p)
Load all Services that can be run upon a keyword parameter.
User * GetUserByIdString(const GrassrootsServer *grassroots_p, const char *id_s)
Get an existing User by the id.
struct ServersManager * GetServersManager(GrassrootsServer *server_p)
Get the ServersManager for a given GrassrootsServer.
Definition: grassroots_server.h:45
A datatype to store user credentials.
Definition: user_details.h:40
struct ServersManager * gs_servers_manager_p
Definition: grassroots_server.h:97
void FreeGrassrootsServer(GrassrootsServer *server_p)
Free a GrassrootsServer.
const char * GetJobLoggingURI(const GrassrootsServer *grassroots_p)
Get the job logging URI for this Grassroots Server.
const char * GetServerProviderDescription(const GrassrootsServer *grassroots_p)
Get the Provider description for this Grassroots Server.
void AddReferenceServices(GrassrootsServer *grassroots_p, LinkedList *services_p, const char *operation_name_s, User *user_p)
Add any reference Services to the list of available Services.
char * gs_jobs_managers_path_s
The relative path from gs_path_s to the folder containing the jobs managers modules.
Definition: grassroots_server.h:82
json_t * GetInitialisedResponseOnServer(GrassrootsServer *server_p, User *user_p, const json_t *req_p, const char *key_s, json_t *value_p)
Create a response object with a valid header and a given key and value.
const char * GetServerProviderURI(const GrassrootsServer *grassroots_p)
Get the Provider URI for this Grassroots Server.
struct JobsManager * GetJobsManager(GrassrootsServer *grassroots_p)
Get the current Server-wide JobsManager.
A Handler is a datatype for accessing data.
Definition: handler.h:72
char * gs_config_filename_s
The path to the global grassroots config file for this GrassrootsServer.
Definition: grassroots_server.h:56
#define GRASSROOTS_SERVICE_MANAGER_API
Definition: grassroots_service_manager_library.h:46
json_t * GetGlobalServiceConfig(GrassrootsServer *grassroots_p, const char *const service_name_s, bool *alloc_flag_p)
Get a configuration value for a named Service.
GRASSROOTS_SERVICE_MANAGER_LOCAL void DisconnectFromExternalServers(GrassrootsServer *server_p)
Disconnect to any defined separate Grassroots servers.
char * gs_config_path_s
The relative path from gs_path_s to the folder containing the individual service config files.
Definition: grassroots_server.h:62
const json_t * GetProviderAsJSON(const GrassrootsServer *grassroots_p)
Get the JSON fragment with all of the details of the Provider for this Grassroots Server.