Documentation ¶
Index ¶
- type Server
- func (s *Server) GetConfig() *conf.Configuration
- func (s *Server) GetDB() *gorm.DB
- func (s *Server) GetModelRegistry() *models.Model
- func (s *Server) GracefulShutdown()
- func (s *Server) NewEnforcer() error
- func (s *Server) NewRouter() *gin.Engine
- func (s *Server) OpenRedis() error
- func (s *Server) RegisterJobs()
- func (m *Server) SeedData() error
- func (s *Server) ShutdownTest()
- func (s *Server) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { Gin *gin.Engine Config *conf.Configuration DB *gorm.DB ACLEnforcer *casbin.Enforcer TestDB *gorm.DB ModelRegistry *models.Model // contains filtered or unexported fields }
Server ...
func (*Server) GetConfig ¶
func (s *Server) GetConfig() *conf.Configuration
GetConfig return the current app configuration
func (*Server) GetModelRegistry ¶
GetModelRegistry returns the model registry
func (*Server) GracefulShutdown ¶
func (s *Server) GracefulShutdown()
GracefulShutdown Wait for interrupt signal to gracefully shutdown the server with a timeout of 5 seconds.
func (*Server) NewEnforcer ¶
Click to show internal directories.
Click to hide internal directories.