Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OutputErr ¶
func OutputErr(w http.ResponseWriter, err error)
func OutputJson ¶ added in v0.13.0
func OutputJson(w http.ResponseWriter, statusCode int, data interface{})
Types ¶
type API ¶
type API interface {
GetAPIs() []*APIHandler
GetName() string
}
type APIConf ¶
type APIConf struct {
Port string `yaml:"port,omitempty"`
Cors bool `yaml:"cors"`
Middle map[string]bool `yaml:"middle,omitempty"`
Apis map[string]bool `yaml:"api,omitempty"`
}
func NewApiConf ¶ added in v0.18.0
func (*APIConf) EnableCORS ¶
type APIHandler ¶
Click to show internal directories.
Click to hide internal directories.