Documentation ¶
Overview ¶
Copyright 2016 Wenhui Shen <www.webx.top>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type Static
- func (s *Static) ClearCache()
- func (s *Static) CssTag(staticFiles ...string) template.HTML
- func (s *Static) CssURL(staticFile string) (r string)
- func (s *Static) DeleteCombined(url string)
- func (s *Static) Handle(ctx echo.Context) error
- func (s *Static) HandleMinify(ctx echo.Context, filePathFn func(string) string) error
- func (s *Static) ImgTag(staticFile string, attrs ...string) template.HTML
- func (s *Static) ImgURL(staticFile string) (r string)
- func (s *Static) IsCombined(combineUrl string) (ok bool)
- func (s *Static) JsTag(staticFiles ...string) template.HTML
- func (s *Static) JsURL(staticFile string) (r string)
- func (s *Static) Middleware() echo.MiddlewareFunc
- func (s *Static) OnUpdate() func(string)
- func (s *Static) RecordCombined(fromUrl string, combineUrl string)
- func (s *Static) RecordCombines(combineUrl string)
- func (s *Static) Register(funcMap map[string]interface{}) map[string]interface{}
- func (s *Static) StaticURL(staticFile string) (r string)
- func (s *Static) Wrapper(r echo.RouteRegister)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Static ¶
type Static struct { *mw.StaticOptions CombineJs bool CombineCss bool CombineSavePath string //合并文件保存路径,首尾均不带斜杠 Combined map[string][]string Combines map[string]bool Public *Static // contains filtered or unexported fields }
func (*Static) ClearCache ¶
func (s *Static) ClearCache()
func (*Static) DeleteCombined ¶
func (*Static) HandleMinify ¶
HandleMinify 网址格式 类型/文件,例如 css/style/reset.css
func (*Static) IsCombined ¶
func (*Static) Middleware ¶
func (s *Static) Middleware() echo.MiddlewareFunc
Middleware 中间件(作为中间件使用)
func (*Static) RecordCombined ¶
func (*Static) RecordCombines ¶
Click to show internal directories.
Click to hide internal directories.