Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
type ErrorOutputAPI ¶ added in v1.0.0
func NewErrorOutputAPI ¶ added in v1.0.0
func NewErrorOutputAPI(service string) ErrorOutputAPI
type GinAPI ¶ added in v1.0.0
type GinAPI interface { GetAPIs() []*GinApiHandler GetName() string }
type GinApiHandler ¶ added in v1.0.0
type GinApiServer ¶ added in v1.0.0
type GinApiServer interface { AddAPIs(handlers ...GinAPI) GinApiServer Middles(mids ...mid.GinMiddle) GinApiServer SetAuth(authmid mid.AuthGinMidInter) GinApiServer Run(port string) error }
func NewGinApiServer ¶ added in v1.0.0
func NewGinApiServer(mode string) GinApiServer
Click to show internal directories.
Click to hide internal directories.