Terarea  2
The automation project
Loading...
Searching...
No Matches
src.lib.components.endpoints.services.Services Class Reference
Collaboration diagram for src.lib.components.endpoints.services.Services:
Collaboration graph

Public Member Functions

None __init__ (self, RuntimeData runtime_data, int success=0, int error=84, bool debug=False)
 
Response get_services (self, Request request)
 
Response get_service_by_id (self, Request request, str service_id)
 
Response get_services_by_tag (self, Request request, str tags)
 
Response get_recent_services (self, Request request)
 
Response get_service_id_by_name (self, Request request, str name)
 
Response create_service (self, Request request, str name)
 
Response update_service (self, Request request, str service_id)
 
Response patch_service (self, Request request, str service_id)
 
Response delete_service (self, Request request, str service_id)
 

Data Fields

bool debug = debug
 
int success = success
 
int error = error
 
RuntimeData runtime_data_initialised = runtime_data
 
Disp disp
 

Detailed Description

The class that contains every method about services

Definition at line 13 of file services.py.

Constructor & Destructor Documentation

◆ __init__()

None src.lib.components.endpoints.services.Services.__init__ ( self,
RuntimeData runtime_data,
int success = 0,
int error = 84,
bool debug = False )
_summary_
The constructor of the services class

Definition at line 18 of file services.py.

Member Function Documentation

◆ create_service()

Response src.lib.components.endpoints.services.Services.create_service ( self,
Request request,
str name )
Create a new service (Only for admin account)

Definition at line 319 of file services.py.

◆ delete_service()

Response src.lib.components.endpoints.services.Services.delete_service ( self,
Request request,
str service_id )
The function to delete a service from the database

Definition at line 614 of file services.py.

◆ get_recent_services()

Response src.lib.components.endpoints.services.Services.get_recent_services ( self,
Request request )
The function to get and filter every services by the most recent to the oldest

Definition at line 216 of file services.py.

◆ get_service_by_id()

Response src.lib.components.endpoints.services.Services.get_service_by_id ( self,
Request request,
str service_id )
The method to get a service by it's id

Definition at line 92 of file services.py.

◆ get_service_id_by_name()

Response src.lib.components.endpoints.services.Services.get_service_id_by_name ( self,
Request request,
str name )
The function to get a service id by the name

Definition at line 276 of file services.py.

◆ get_services()

Response src.lib.components.endpoints.services.Services.get_services ( self,
Request request )
The method to get every services contained in the db

Definition at line 35 of file services.py.

◆ get_services_by_tag()

Response src.lib.components.endpoints.services.Services.get_services_by_tag ( self,
Request request,
str tags )
The function to get and filter every services by specifics tag

Definition at line 146 of file services.py.

◆ patch_service()

Response src.lib.components.endpoints.services.Services.patch_service ( self,
Request request,
str service_id )
Update a service value (Only for admin account)

Definition at line 495 of file services.py.

◆ update_service()

Response src.lib.components.endpoints.services.Services.update_service ( self,
Request request,
str service_id )
Update a service data (Only for admin account)

Definition at line 399 of file services.py.

Field Documentation

◆ debug

bool src.lib.components.endpoints.services.Services.debug = debug

Definition at line 22 of file services.py.

◆ disp

Disp src.lib.components.endpoints.services.Services.disp
Initial value:
= Disp(
TOML_CONF,
SAVE_TO_FILE,
FILE_NAME,
FILE_DESCRIPTOR,
debug=self.debug,
logger=self.__class__.__name__
)

Definition at line 26 of file services.py.

◆ error

int src.lib.components.endpoints.services.Services.error = error

Definition at line 24 of file services.py.

◆ runtime_data_initialised

RuntimeData src.lib.components.endpoints.services.Services.runtime_data_initialised = runtime_data

Definition at line 25 of file services.py.

◆ success

int src.lib.components.endpoints.services.Services.success = success

Definition at line 23 of file services.py.


The documentation for this class was generated from the following file: