Documentation
¶
Index ¶
- Constants
- type BambooApplication
- type BambooConfig
- func (this *BambooConfig) FinishInstall(mysqlPort int, mysqlHost string, mysqlSchema string, mysqlUsername string, ...)
- func (this *BambooConfig) Init()
- func (this *BambooConfig) Installed() bool
- func (this *BambooConfig) MysqlUrl() string
- func (this *BambooConfig) ReadFromConfigFile()
- func (this *BambooConfig) ServerPort() int
- type BambooContext
- func (this *BambooContext) Cleanup()
- func (this *BambooContext) CloseDb()
- func (this *BambooContext) Destroy()
- func (this *BambooContext) GetBean(bean core.Bean) core.Bean
- func (this *BambooContext) GetControllerMap() map[string]core.Controller
- func (this *BambooContext) GetDB() *gorm.DB
- func (this *BambooContext) GetSessionCache() *cache.Table
- func (this *BambooContext) Init()
- func (this *BambooContext) InstallOk()
- func (this *BambooContext) OpenDb()
- func (this *BambooContext) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- type BambooLogger
- func (this *BambooLogger) Debug(format string, v ...interface{})
- func (this *BambooLogger) Destroy()
- func (this *BambooLogger) Error(format string, v ...interface{})
- func (this *BambooLogger) Info(format string, v ...interface{})
- func (this *BambooLogger) Init()
- func (this *BambooLogger) Log(prefix string, format string, v ...interface{})
- func (this *BambooLogger) Panic(format string, v ...interface{})
- func (this *BambooLogger) Warn(format string, v ...interface{})
- type BambooRouter
- type ConfigItem
Constants ¶
View Source
const ( //start web. This is the default mode. MODE_WEB = "web" MODE_VERSION = "version" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BambooApplication ¶
type BambooApplication struct {
// contains filtered or unexported fields
}
func (*BambooApplication) HandleVersion ¶
func (this *BambooApplication) HandleVersion()
fetch the application version
func (*BambooApplication) HandleWeb ¶
func (this *BambooApplication) HandleWeb()
type BambooConfig ¶
type BambooConfig struct {
// contains filtered or unexported fields
}
func (*BambooConfig) FinishInstall ¶
func (this *BambooConfig) FinishInstall(mysqlPort int, mysqlHost string, mysqlSchema string, mysqlUsername string, mysqlPassword string)
Finish the installation. Write config to bamboo.json
func (*BambooConfig) Init ¶
func (this *BambooConfig) Init()
func (*BambooConfig) ReadFromConfigFile ¶
func (this *BambooConfig) ReadFromConfigFile()
type BambooContext ¶
type BambooContext struct {
//session cache
SessionCache *cache.Table
//bean map.
BeanMap map[string]core.Bean
//controller map
ControllerMap map[string]core.Controller
//router
Router *BambooRouter
// contains filtered or unexported fields
}
func (*BambooContext) Cleanup ¶
func (this *BambooContext) Cleanup()
func (*BambooContext) CloseDb ¶
func (this *BambooContext) CloseDb()
func (*BambooContext) Destroy ¶
func (this *BambooContext) Destroy()
func (*BambooContext) GetControllerMap ¶
func (this *BambooContext) GetControllerMap() map[string]core.Controller
func (*BambooContext) GetDB ¶
func (this *BambooContext) GetDB() *gorm.DB
func (*BambooContext) GetSessionCache ¶
func (this *BambooContext) GetSessionCache() *cache.Table
func (*BambooContext) Init ¶
func (this *BambooContext) Init()
func (*BambooContext) InstallOk ¶
func (this *BambooContext) InstallOk()
if application installed. invoke this method.
func (*BambooContext) OpenDb ¶
func (this *BambooContext) OpenDb()
func (*BambooContext) ServeHTTP ¶
func (this *BambooContext) ServeHTTP(writer http.ResponseWriter, request *http.Request)
can serve as http server.
type BambooLogger ¶
type BambooLogger struct {
//lock. when maintaining, cannot write
sync.RWMutex
// contains filtered or unexported fields
}
func (*BambooLogger) Debug ¶
func (this *BambooLogger) Debug(format string, v ...interface{})
func (*BambooLogger) Destroy ¶
func (this *BambooLogger) Destroy()
func (*BambooLogger) Error ¶
func (this *BambooLogger) Error(format string, v ...interface{})
func (*BambooLogger) Info ¶
func (this *BambooLogger) Info(format string, v ...interface{})
func (*BambooLogger) Init ¶
func (this *BambooLogger) Init()
func (*BambooLogger) Log ¶
func (this *BambooLogger) Log(prefix string, format string, v ...interface{})
uniform log method
func (*BambooLogger) Panic ¶
func (this *BambooLogger) Panic(format string, v ...interface{})
func (*BambooLogger) Warn ¶
func (this *BambooLogger) Warn(format string, v ...interface{})
type BambooRouter ¶
type BambooRouter struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter() *BambooRouter
func (*BambooRouter) GlobalPanicHandler ¶
func (this *BambooRouter) GlobalPanicHandler(writer http.ResponseWriter, request *http.Request, startTime time.Time)
catch global panic.
func (*BambooRouter) ServeHTTP ¶
func (this *BambooRouter) ServeHTTP(writer http.ResponseWriter, request *http.Request)
Click to show internal directories.
Click to hide internal directories.