Documentation ¶
Overview ¶
*
- Copyright 2015 @ z3q.net.
- name : device
- author : jarryliu
- date : -- :
- description :
- history :
*
- Copyright 2015 @ z3q.net.
- name : member.go
- author : jarryliu
- date : -- :
- description :
- history :
*
- Copyright 2015 @ z3q.net.
- name : static
- author : jarryliu
- date : -- :
- description :
- history :
Index ¶
- Constants
- Variables
- func CompareMemberApiToken(sto gof.Storage, memberId int, token string) bool
- func GetBrownerDevice(r *http.Request) string
- func GetMemberApiToken(sto gof.Storage, memberId int) (string, string)
- func GetMemberApiTokenKey(memberId int) string
- func MemberHttpSessionConnect(ctx *echox.Context, call func(memberId int)) (ok bool, memberId int)
- func MemberHttpSessionDisconnect(ctx *echox.Context) bool
- func RemoveMemberApiToken(sto gof.Storage, memberId int, token string) bool
- func SetBrownerDevice(w http.ResponseWriter, r *http.Request, deviceType string)
- func SetDeviceByUrlQuery(w http.ResponseWriter, r *http.Request) bool
- func SetMemberApiToken(sto gof.Storage, memberId int, pwd string) string
Constants ¶
View Source
const ( // PC设备 DevicePC string = "1" // 手持设备 DeviceMobile string = "2" // 触摸设备 DeviceTouchPad string = "3" // APP内嵌网页 DeviceAppEmbed string = "4" )
Variables ¶
View Source
var HttpImageFileHandler = func(ctx *web.Context) { path := strings.Replace(ctx.Request.URL.Path, "/img/", "", 1) http.ServeFile(ctx.Response, ctx.Request, "./static/uploads/"+path) }
View Source
var HttpStaticFileHandler = func(ctx *web.Context) { http.ServeFile(ctx.Response, ctx.Request, "."+ctx.Request.URL.Path) }
处理静态文件
Functions ¶
func CompareMemberApiToken ¶
校验令牌
func GetMemberApiToken ¶
获取会员的API令牌
func MemberHttpSessionConnect ¶
会员Http请求会话链接
func MemberHttpSessionDisconnect ¶
会员Http请求会话链接
func RemoveMemberApiToken ¶
移除会员令牌
func SetBrownerDevice ¶
func SetBrownerDevice(w http.ResponseWriter, r *http.Request, deviceType string)
设置浏览设备
func SetDeviceByUrlQuery ¶
func SetDeviceByUrlQuery(w http.ResponseWriter, r *http.Request) bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.