webs

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Method string // GET POST PUT DELETE
	Path   string // 路径
	File   string // 文件
	Type   string // Binary,Text,HTML,JSON,JSONP,XML
	// contains filtered or unexported fields
}

Handler 句柄.

Example
handler := []webs.Handler{{
	Method: "GET",
	Path:   "/a",
	File:   "a.txt",
	Type:   "Text",
}}
data, _ := yaml.Marshal(handler)
fmt.Println(string(data))
Output:

- method: GET
  path: /a
  file: a.txt
  type: Text

func Load

func Load(file string) (hs []Handler, err error)

Load 加载.

func (Handler) Handler

func (h Handler) Handler(ctx iris.Context)

Handler 句柄.

Jump to

Keyboard shortcuts

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