Documentation
¶
Index ¶
- func NewApiRouter(app *App) (*gin.RouterGroup, error)
- func NewDb(dbConf *config.DatabaseConfig) (*gorm.DB, error)
- func NewEngine(app *App) (*gin.Engine, error)
- func NewRedis(redisConfig *config.RedisConfig) (redis.Store, error)
- func NewZapLogger(zapConfig *zap.Config) (*zap.Logger, error)
- func StaticRoutes(app *App) error
- type APIRouter
- type App
- type Controller
- type HttpServer
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewApiRouter ¶
func NewApiRouter(app *App) (*gin.RouterGroup, error)
func StaticRoutes ¶
Types ¶
type App ¶
type App struct { Config *config.Config DB *gorm.DB DataStore *data.DataStore BizStore *biz.BizStore RedisStore redis.Store Logger *zap.Logger TokenService *utils.JWT Engine *gin.Engine // contains filtered or unexported fields }
func (*App) AddRouters ¶
type Controller ¶
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(app *App) (*HttpServer, error)
func (*HttpServer) ListenAndServe ¶
func (s *HttpServer) ListenAndServe() error
Click to show internal directories.
Click to hide internal directories.