Documentation ¶
Index ¶
- Constants
- func BlackList(playerid int64) (bool, error)
- func GenSign(vals ...string) string
- func GetLocalServer() string
- func GetServerID() string
- func Listen(server *api.Conf, svc api.Service)
- func Makesign(r *http.Request, path string) string
- func Register(paths map[string]HTTPRecv, check bool)
- func RegisterContent(paths map[string]ContentRecv)
- func RegisterHTTPRecvJSON(paths map[string]HTTPRecv, check bool)
- func RegisterJSON(paths map[string]JSONRecv)
- func RegisterString(paths map[string]StringRecv)
- func Run(cfg *api.Conf, service api.Service)
- func Start(addr string)
- type ContentRecv
- type HTTPRecv
- type JSONRecv
- type Request
- func (r *Request) AllStringParam() string
- func (r *Request) Body() []byte
- func (r *Request) GetCookie() *api.Cookie
- func (r *Request) GetHTTPRequest() *http.Request
- func (r *Request) GetRemoteAddr() string
- func (r *Request) GetRequest() *http.Request
- func (r *Request) GetVals() url.Values
- func (r *Request) GetXForwardedFor() string
- func (r *Request) Int32Param(key string) (int32, bool)
- func (r *Request) Int64Param(key string) (int64, bool)
- func (r *Request) IntParam(key string) (int, bool)
- func (r *Request) SendCode(data []byte)
- func (r *Request) SendNotFind()
- func (r *Request) SendSUCCESS()
- func (r *Request) SetCookie(cookie *api.Cookie)
- func (r *Request) StringParam(key string) (string, bool)
- func (r *Request) Token() *api.Token
- func (r *Request) VerifyToken() bool
- type StringRecv
Constants ¶
View Source
const (
// SignKey 签名Key
SignKey = "EE7a1c5bc548e542GBFc340c531657F4"
)
Variables ¶
This section is empty.
Functions ¶
func RegisterHTTPRecvJSON ¶
RegisterHTTPRecvJSON 注册协议
Types ¶
type Request ¶
type Request struct { Path string Method string Log *mlog.Logger // contains filtered or unexported fields }
Request 请求结构
func NewRequest ¶
func NewRequest(w http.ResponseWriter, r *http.Request) *Request
NewRequest 创建请求对象
func (*Request) GetHTTPRequest ¶
GetHTTPRequest 获取http请求结构体
func (*Request) GetXForwardedFor ¶
GetXForwardedFor 获得远端地址
func (*Request) Int32Param ¶
Int32Param 获得int32参数
func (*Request) Int64Param ¶
Int64Param 获得int64参数
func (*Request) StringParam ¶
StringParam 获得字符串参数
Click to show internal directories.
Click to hide internal directories.