Documentation ¶
Index ¶
- func GetLog() *zap.SugaredLogger
- func GetRedisClient() *redis.Client
- func GetStore() db.Store
- func NewApplication(echo *echo.Echo)
- func NewConfig()
- func NewDBConn(conn *sql.DB)
- func NewRedis(r *redis.Client)
- func NewStore(st db.Store)
- func SetupLog()
- type AppConfig
- func (*AppConfig) Bool(key string) bool
- func (*AppConfig) DefaultInt(key string, defaultVal int) int
- func (*AppConfig) DefaultString(key string, defaultVal string) string
- func (*AppConfig) Duration(key string) time.Duration
- func (c *AppConfig) GetMode() string
- func (*AppConfig) Int(key string) int
- func (c *AppConfig) IsDev() bool
- func (*AppConfig) String(key string) string
- type Application
- func (app *Application) PrintRoutes(filename string)
- func (app *Application) RegisterHandler(fn context.AppRegisterFunc, path string, h context.AppHandlerFunc, ...) *echo.Route
- func (app *Application) RegisterRoutes(register func(*Application))
- func (app *Application) RoutePath(name string, params ...interface{}) string
- func (app *Application) RunServer()
- type DBConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRedisClient ¶
GetRedisClient returns a redis client instance
func NewApplication ¶
func NewApplication(echo *echo.Echo)
NewApplication creates and set a server instance
Types ¶
type AppConfig ¶
type AppConfig struct{}
func (*AppConfig) DefaultInt ¶
DefaultInt returns a int value of key, if not exists key then returns a default value
func (*AppConfig) DefaultString ¶
DefaultString returns a string value of key, if not exists key then returns a default value
type Application ¶
type Application struct {
*echo.Echo
}
func GetApplication ¶
func GetApplication() *Application
GetApplication return a application instance
func (*Application) PrintRoutes ¶
func (app *Application) PrintRoutes(filename string)
PrintRoutes prints route information of echo server to a file
func (*Application) RegisterHandler ¶
func (app *Application) RegisterHandler(fn context.AppRegisterFunc, path string, h context.AppHandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
RegisterHandler 핸들러 등록
func (*Application) RegisterRoutes ¶
func (app *Application) RegisterRoutes(register func(*Application))
RegisterRoutes Routes 등록
func (*Application) RoutePath ¶
func (app *Application) RoutePath(name string, params ...interface{}) string
RoutePath returns a reverse routes path
Click to show internal directories.
Click to hide internal directories.