Documentation
¶
Index ¶
- Variables
- type AssestFile
- type AssestStruct
- func (statics *AssestStruct) FileHandlerFunc(name string) http.HandlerFunc
- func (statics *AssestStruct) GetAssestFile(name string) (*AssestFile, error)
- func (statics AssestStruct) GetContent(name string) string
- func (statics AssestStruct) GetFileNames(dir string) []string
- func (statics *AssestStruct) HTTPHandler(baseDir string) http.Handler
Constants ¶
This section is empty.
Variables ¶
View Source
var Assest = &AssestStruct{ Files: map[string]*AssestFile{ _assestBase64Decode("L3Jlcy9iLmNzcw=="): &AssestFile{ Name: _assestBase64Decode("L3Jlcy9iLmNzcw=="), Mtime: 1440515205, Content: _assestGzipBase64decode("H4sIAAAJbogA/8owrE7LzyvRLc6sSrUysSiosE7Oz8kvskovSk3Nq80wroZwi1JTajNMkDgAAAAA//8BAAD///xF3Xc4AAAA"), }, _assestBase64Decode("L3Jlcy9pbmRleC5odG1s"): &AssestFile{ Name: _assestBase64Decode("L3Jlcy9pbmRleC5odG1s"), Mtime: 1463833239, Content: _assestGzipBase64decode("H4sIAAAJbogA/5ySvVLDMBCE+zzFRb0j8lNQyG74aaEIBRUjy0dkR4k9uhsgb8/JDjMOpPBQaeZuv9tN1mZ+/3S3fX1+AM+HUMzMz4O2kueAbMF5Gwk5Vy/bx+xWyZhrDlh4DKEFS4TERg+zmQn1cQ8RQ66ITwHJI7ICPnWYK8Yv1o5IgY/4nisdkXS5SBMhycW647G0sR92mCqg6M5AQ9ouGkGMHpYT2SZ5XXLTQGLLtUu8+xefQo8oMPMsg83NBrJsYvTO7lCA8ZFfV/S5sbKtTimXX577+WxjqGS9lGVXGPv3rwe2cZf6fSuDPe5V0Y+NtuLWyS05tip27VA0VHho5dyqN1lDXeWqN0rZ/LroU6V6wLVHFm+ouU94qc7Ksb68or+Uu7HcXZPr4ZeLKn3B3wAAAP//AQAA///hx62x2AIAAA=="), }, _assestBase64Decode("L3Jlcy9qcy9hLmpz"): &AssestFile{ Name: _assestBase64Decode("L3Jlcy9qcy9hLmpz"), Mtime: 1440515205, Content: _assestGzipBase64decode("H4sIAAAJbogA/ypOLQnJzE3NLy3RSCvNSy7JzM/T0KxOyU8uzU3NK9FLTy1xzUkFMZ0qPVM0lDJSc3LylTT1MvPyUos8Qnx9bCFCOol6WcUKRkrWtTqGBgYGmtYAAAAA//8BAAD//4rtx7JYAAAA"), }, _assestBase64Decode("L3Jlcy9qcy9iLmpz"): &AssestFile{ Name: _assestBase64Decode("L3Jlcy9qcy9iLmpz"), Mtime: 1463832956, Content: _assestGzipBase64decode("H4sIAAAJbogA/ypOLQnJzE3NLy3RSCvNSy7JzM/T0KxOyU8uzU3NK9FLTy1xzUkFMZ0qPVM0lDJSc3LydZOUNPUy8/JSizxCfH1sIYI6SXpZxQpGSta1OoYGBgaa1gAAAAD//wEAAP//8g4AUloAAAA="), }, _assestBase64Decode("L3Jlcy9qcy9jLmpz"): &AssestFile{ Name: _assestBase64Decode("L3Jlcy9qcy9jLmpz"), Mtime: 1463833139, Content: _assestGzipBase64decode("H4sIAAAJbogA/ypOLQnJzE3NLy3RSCvNSy7JzM/T0KxOyU8uzU3NK9FLTy1xzUkFMZ0qPVM0lDJSc3LydZOVNPUy8/JSizxCfH1sIYI6yXpZxQpGSta1OoYGBgaa1gAAAAD//wEAAP//fIiYfFoAAAA="), }, }, }
Assest export assests
Functions ¶
This section is empty.
Types ¶
type AssestFile ¶
AssestFile assest file struct
type AssestStruct ¶
type AssestStruct struct {
Files map[string]*AssestFile
}
AssestStruct assest files
func (*AssestStruct) FileHandlerFunc ¶
func (statics *AssestStruct) FileHandlerFunc(name string) http.HandlerFunc
FileHandlerFunc handler http files
func (*AssestStruct) GetAssestFile ¶
func (statics *AssestStruct) GetAssestFile(name string) (*AssestFile, error)
GetAssestFile get file by name
func (AssestStruct) GetContent ¶
func (statics AssestStruct) GetContent(name string) string
GetContent get content by name
func (AssestStruct) GetFileNames ¶
func (statics AssestStruct) GetFileNames(dir string) []string
GetFileNames get all file names
func (*AssestStruct) HTTPHandler ¶
func (statics *AssestStruct) HTTPHandler(baseDir string) http.Handler
http.Handle("/js/",res.Assest.HttpHandler("/res/"))
Click to show internal directories.
Click to hide internal directories.