@3kles/3kles-corebe 中文文档教程

发布于 3年前 浏览 24 项目主页 更新于 3年前

3KLES -COREBE

此包包含用于创建 Express 应用程序

API

  • buildRequest: Method to build the request api from parameters and data
  • executeRequest: Method to execute the request
  • processResponse: Method called to manage response
  • processError: Method called to manage error response

接口和类管理http/s请求协议。

App

IGenericApp 是一个定义如下的接口:

  • initAppVariable: Method to init variable (Exemple from dotenv)
  • initModule: Method to load module
  • initError: Method to manage error
  • initRoute: Method to set main router
  • startApp: Start app with port number

Router

IGenericRouter 是一个定义如下的接口:

  • addController:Method to add route from controller

Controller

IGenericController 是一个定义如下的接口:

  • execute: Method to execute request from type
  • setService:Method to set IGenericService
  • getParameters:Method to get service parameters
  • updateParamFromRequest:Method to update controller parameters from request

Service

IGenericService< /strong> 是一个定义如下的接口:

  • execute: Method to execute request from parameters
  • getParameters:Method to get service parameters

3KLES -COREBE

This package contains interface and class to create Express Application

API

IGenericAPI is an interface with four methods:

  • buildRequest: Method to build the request api from parameters and data
  • executeRequest: Method to execute the request
  • processResponse: Method called to manage response
  • processError: Method called to manage error response

In this module there is a class HttpApi that implement IGenericApi to manage http/s request protocol.

App

IGenericApp is an interface defined as below:

  • initAppVariable: Method to init variable (Exemple from dotenv)
  • initModule: Method to load module
  • initError: Method to manage error
  • initRoute: Method to set main router
  • startApp: Start app with port number

Router

IGenericRouter is an interface defined as below:

  • addController:Method to add route from controller

Controller

IGenericController is an interface defined as below:

  • execute: Method to execute request from type
  • setService:Method to set IGenericService
  • getParameters:Method to get service parameters
  • updateParamFromRequest:Method to update controller parameters from request

Service

IGenericService is an interface defined as below:

  • execute: Method to execute request from parameters
  • getParameters:Method to get service parameters
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文