resource

package
v2.1.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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 NewStatic

func NewStatic(staticPath, rootPath string) *Static

func (*Static) CSST

func (s *Static) CSST(staticFiles ...string) template.HTML

func (*Static) CSSURL

func (s *Static) CSSURL(staticFile string) (r string)

func (*Static) ClearCache

func (s *Static) ClearCache()

func (*Static) DeleteCombined

func (s *Static) DeleteCombined(url string)

func (*Static) Handle added in v1.3.0

func (s *Static) Handle(ctx echo.Context) error

Handle 处理

func (*Static) HandleMinify

func (s *Static) HandleMinify(ctx echo.Context, filePathFn func(string) string) error

HandleMinify 网址格式 类型/文件,例如 css/style/reset.css

func (*Static) IMGT

func (s *Static) IMGT(staticFile string, attrs ...string) template.HTML

func (*Static) IMGURL

func (s *Static) IMGURL(staticFile string) (r string)

func (*Static) IsCombined

func (s *Static) IsCombined(combineUrl string) (ok bool)

func (*Static) JST

func (s *Static) JST(staticFiles ...string) template.HTML

func (*Static) JSURL

func (s *Static) JSURL(staticFile string) (r string)

func (*Static) Middleware added in v1.3.0

func (s *Static) Middleware() echo.MiddlewareFunc

Middleware 中间件(作为中间件使用)

func (*Static) OnUpdate

func (s *Static) OnUpdate() func(string)

func (*Static) RecordCombined

func (s *Static) RecordCombined(fromUrl string, combineUrl string)

func (*Static) RecordCombines

func (s *Static) RecordCombines(combineUrl string)

func (*Static) Register

func (s *Static) Register(funcMap map[string]interface{}) map[string]interface{}

func (*Static) StaticURL

func (s *Static) StaticURL(staticFile string) (r string)

func (*Static) Wrapper added in v1.3.0

func (s *Static) Wrapper(r echo.RouteRegister)

Wrapper 包装路由(作为路由时使用)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL