Documentation
¶
Overview ¶
Package host 管理路由中域名的切换等操作
Index ¶
- func IsWell(pattern string) (err error)
- type Hosts
- func (hs *Hosts) Add(pattern string, h http.Handler, method ...string) error
- func (hs *Hosts) All(ignoreHead, ignoreOptions bool) (routes map[string][]string)
- func (hs *Hosts) Clean(prefix string)
- func (hs *Hosts) CleanAll()
- func (hs *Hosts) Handler(hostname, path string) (*handlers.Handlers, params.Params)
- func (hs *Hosts) Remove(pattern string, method ...string)
- func (hs *Hosts) SetAllow(pattern string, allow string)
- func (hs *Hosts) URL(pattern string, params map[string]string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hosts ¶
type Hosts struct {
// contains filtered or unexported fields
}
Hosts 域名管理
func (*Hosts) All ¶ added in v2.2.0
All 返回所有的路由项
ignoreHead 是否忽略自动生成的 HEAD 请求 ignoreOptions 是否忽略自动生成的 OPTIONS 请求
Click to show internal directories.
Click to hide internal directories.