package
2.4.4+incompatible
Repository: https://github.com/laincloud/lainlet.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

GetBool search the boolean argument by given name from the URL and PostForm, if not exists, return the given value as default.
GetInt search the integer argument by given name from the URL and PostForm, if not exists, return the given value as default.
GetString search the string argument by given name from the URL and PostForm, if not exists, return the given value as default.
New create a http api server; ip is the server ip, it was used by some query; version is the lainlet version, used to return by `/version` api; st is the backend store, it must be valided, should not be a empty interface or a nil value.
NewEventSource create a new event source, event source will hijack w.conn; so you can not write anything to this responseWriter after calling this.
Return write response to w, code is the http code, data is the content will write into responseBody, can be string or []byte.

# Structs

EventSource is a component which can hajick http connection and then send event to client.
Server used by lainlet, based on martini.

# Interfaces

API is a common interface which a api instance must realize.
BanWatcher is a interface to ban watch feature.
EventData is a type which can be send by SendEvent(), SendEvent() will call Encode() and then write result into connection.