Documentation
¶
Index ¶
- Constants
- func GetEnv(name, title string, wsParams libParams.ParamInterface, requestFields string) *requestCore.RequestCoreModel
- func InitDB(dbParams *libParams.DbParams)
- func InitDataBases(params libParams.ParamInterface, dbNames []string)
- func Listen(netParams *libParams.NetworkParams, app *gin.Engine)
- func StartApp[T any](app App[T])
- type App
- type AppEnv
- type Application
- type NoReq
- func (n NoReq) AddRequestEvent(_ webFramework.WebFramework, _, _, _ string, _ libRequest.RequestPtr)
- func (n NoReq) AddRequestLog(_, _ string, _ libRequest.RequestPtr)
- func (n NoReq) CheckDuplicateRequest(_ libRequest.RequestPtr) error
- func (n NoReq) InitRequest(_ webFramework.WebFramework, _, _ string) error
- func (n NoReq) Initialize(_ webFramework.WebFramework, _, _ string, _ libRequest.RequestPtr, _ ...any) (int, map[string]string, error)
- func (n NoReq) InitializeNoLog(_ webFramework.WebFramework, _, _ string, _ libRequest.RequestPtr, _ ...any) (int, map[string]string, error)
- func (n NoReq) InsertRequest(_ libRequest.RequestPtr) error
- func (n NoReq) LogEnd(_, _ string, _ libRequest.RequestPtr)
- func (n NoReq) LogStart(_ webFramework.WebFramework, _, _ string) libRequest.RequestPtr
- func (n NoReq) UpdateRequestWithContext(_ context.Context, _ libRequest.RequestPtr) error
Constants ¶
View Source
const DefaultRequestFields = "id,dt,incoming,action_id,national_id,branch_id,user_id,outgoing,result,events"
View Source
const LogRequest = "log_req"
View Source
const NoRequest = "no_req"
Variables ¶
This section is empty.
Functions ¶
func GetEnv ¶
func GetEnv( name, title string, wsParams libParams.ParamInterface, requestFields string, ) *requestCore.RequestCoreModel
func InitDataBases ¶
func InitDataBases(params libParams.ParamInterface, dbNames []string)
Types ¶
type App ¶ added in v0.16.6
type App[T any] struct { Instance Application[T] Params *libParams.ApplicationParams[T] Engine *gin.Engine Model requestCore.RequestCoreInterface }
func InitializeApp ¶
func InitializeApp[T any](app Application[T]) *App[T]
type AppEnv ¶
type AppEnv struct { Params libParams.ParamInterface Interface requestCore.RequestCoreInterface }
type Application ¶
type Application[T any] interface { AddRoutes( model *requestCore.RequestCoreModel, wsParams *libParams.ApplicationParams[T], roleMap map[string]string, rg *gin.RouterGroup, ) Title() string Name() string Version() string BasePath() string HasSwagger() bool SwaggerSpec() *swag.Spec RequestFields() string InitGinApp(*gin.Engine) InitParams(wsParams *libParams.ApplicationParams[T]) GetDbList() []string GetKeys() [][]byte GetCorsConfig() *cors.Config }
type NoReq ¶
type NoReq struct { }
func (NoReq) AddRequestEvent ¶
func (n NoReq) AddRequestEvent(_ webFramework.WebFramework, _, _, _ string, _ libRequest.RequestPtr)
func (NoReq) AddRequestLog ¶
func (n NoReq) AddRequestLog(_, _ string, _ libRequest.RequestPtr)
func (NoReq) CheckDuplicateRequest ¶
func (n NoReq) CheckDuplicateRequest(_ libRequest.RequestPtr) error
func (NoReq) InitRequest ¶
func (n NoReq) InitRequest(_ webFramework.WebFramework, _, _ string) error
func (NoReq) Initialize ¶
func (n NoReq) Initialize( _ webFramework.WebFramework, _, _ string, _ libRequest.RequestPtr, _ ...any) ( int, map[string]string, error)
func (NoReq) InitializeNoLog ¶
func (n NoReq) InitializeNoLog( _ webFramework.WebFramework, _, _ string, _ libRequest.RequestPtr, _ ...any) ( int, map[string]string, error)
func (NoReq) InsertRequest ¶
func (n NoReq) InsertRequest(_ libRequest.RequestPtr) error
func (NoReq) LogEnd ¶
func (n NoReq) LogEnd(_, _ string, _ libRequest.RequestPtr)
func (NoReq) LogStart ¶
func (n NoReq) LogStart(_ webFramework.WebFramework, _, _ string) libRequest.RequestPtr
func (NoReq) UpdateRequestWithContext ¶
func (n NoReq) UpdateRequestWithContext(_ context.Context, _ libRequest.RequestPtr) error
Click to show internal directories.
Click to hide internal directories.