webs

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 5 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
hs := []Handler{{
	Method: "GET",
	Path:   "/a",
	File:   "a.txt",
	Type:   "Text",
}}
bs, _ := yaml.Marshal(hs)
fmt.Println(string(bs))
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() iris.Handler

Handler 句柄

Jump to

Keyboard shortcuts

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