source: ogServer-Git/src/cfg.h @ a67f27a

Last change on this file since a67f27a was 403e7c3, checked in by OpenGnSys Support Team <soporte-og@…>, 4 years ago

#1004 Add GET /images

This commit adds GET /images to the ogServer REST API.

This call returns information of all the images in ogServer.

Example response:

{

"images": [

{

"filename": "ubuntu.img",
"datasize": 2150400000,
"size": 613476223,
"modified": "Wed Sep 23 10:37:36 2020",
"permissions": "744"

},
{

"filename": "test.img",
"datasize": 2150400000,
"size": 613236475,
"modified": "Tue Sep 29 08:57:47 2020",
"permissions": "744"

}

],
"disk": {

"total": 52573995008,
"free": 39624544256

}

}

  • Property mode set to 100644
File size: 762 bytes
Line 
1#ifndef _OG_SERVER_CFG_H
2#define _OG_SERVER_CFG_H
3
4struct og_server_cfg {
5        struct {
6                const char *user;
7                const char *pass;
8                const char *ip;
9                unsigned int port;
10                const char *name;
11        } db;
12        struct {
13                const char      *ip;
14                const char      *port;
15                const char      *api_token;
16        } rest;
17        struct {
18                const char      *interface;
19        } wol;
20        struct {
21                const char      *dir;
22        } repo;
23        json_t                  *json;
24};
25
26int parse_json_config(const char *filename, struct og_server_cfg *cfg);
27void from_json_to_legacy(struct og_server_cfg *cfg);
28
29extern struct og_server_cfg cfg;
30
31#endif
Note: See TracBrowser for help on using the repository browser.