Documentation
¶
Index ¶
- type API_Resp
- type FlyApi
- func (s *FlyApi) Err(data interface{}) API_Resp
- func (s *FlyApi) Ok(data interface{}) API_Resp
- func (s *FlyApi) V(key string, defaults string) string
- func (s *FlyApi) VBase64(key string, defaults []byte) []byte
- func (s *FlyApi) VBool(key string, defaults bool) bool
- func (s *FlyApi) VFloat64(key string, defaults float64) float64
- func (s *FlyApi) VInt(key string, defaults int) int
- func (s *FlyApi) VInt64(key string, defaults int64) int64
- func (s *FlyApi) VString(key string, defaults string) string
- type FlyApiServer
- func (s *FlyApiServer) Handle(pattern string, handler http.Handler)
- func (s *FlyApiServer) HandleApi(pattern string, handler func(*FlyApi) any) (err error)
- func (s *FlyApiServer) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
- func (s *FlyApiServer) LoadSettings(settings *FlyApiSettings)
- func (s *FlyApiServer) Open(settings *FlyApiSettings) error
- func (s *FlyApiServer) Start() error
- type FlyApiServerBasicInterface
- type FlyApiSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlyApi ¶
type FlyApi struct { W http.ResponseWriter R *http.Request ServerSettings FlyApiSettings }
func NewFlyApi ¶
func NewFlyApi(w http.ResponseWriter, r *http.Request, settings FlyApiSettings) *FlyApi
type FlyApiServer ¶
type FlyApiServer struct { Settings *FlyApiSettings Server *http.Server ServerMux *http.ServeMux Ready bool }
func NewFlyApiServer ¶
func NewFlyApiServer() *FlyApiServer
func (*FlyApiServer) HandleApi ¶
func (s *FlyApiServer) HandleApi(pattern string, handler func(*FlyApi) any) (err error)
func (*FlyApiServer) HandleFunc ¶
func (s *FlyApiServer) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
func (*FlyApiServer) LoadSettings ¶
func (s *FlyApiServer) LoadSettings(settings *FlyApiSettings)
func (*FlyApiServer) Start ¶
func (s *FlyApiServer) Start() error
type FlyApiSettings ¶
type FlyApiSettings struct { Enable bool ConfigType string ConfigKey string Debug bool Addr string Token string Ready bool }
func NewFlyApiSettings ¶
func NewFlyApiSettings() *FlyApiSettings
func (*FlyApiSettings) LoadIni ¶
func (s *FlyApiSettings) LoadIni(config *FlyConfigFile.FlyIni, key string) error
从ini加载配置信息
Click to show internal directories.
Click to hide internal directories.