Documentation ¶
Index ¶
- Constants
- func ActivityAdd(ver string) gin.HandlerFunc
- func ActivityDelete(ver string) gin.HandlerFunc
- func ActivityList(ver string) gin.HandlerFunc
- func ActivityShow(ver string) gin.HandlerFunc
- func ActivityUpdate(ver string) gin.HandlerFunc
- func ActivityUserList(ver string) gin.HandlerFunc
- func AuthorizeRequest(ver string) gin.HandlerFunc
- func Error(ctx *gin.Context, err error)
- func FAIL(msg string) util.Map
- func FailDes(msg string) util.Map
- func JSONResponse(w http.ResponseWriter, data []byte) error
- func NotifyPaymentUnify(ver string) gin.HandlerFunc
- func NotifyServer(ver string) gin.HandlerFunc
- func PermissionAdd(ver string) gin.HandlerFunc
- func PermissionDelete(ver string) gin.HandlerFunc
- func PermissionList(ver string) gin.HandlerFunc
- func PermissionRoleList(ver string) gin.HandlerFunc
- func PermissionShow(ver string) gin.HandlerFunc
- func PermissionUpdate(ver string) gin.HandlerFunc
- func PermissionUserList(ver string) gin.HandlerFunc
- func PropertyAdd(ver string) gin.HandlerFunc
- func PropertyDelete(ver string) gin.HandlerFunc
- func PropertyList(ver string) gin.HandlerFunc
- func PropertyShow(ver string) gin.HandlerFunc
- func PropertyUpdate(ver string) gin.HandlerFunc
- func RoleAdd(ver string) gin.HandlerFunc
- func RoleDelete(ver string) gin.HandlerFunc
- func RoleList(ver string) gin.HandlerFunc
- func RolePermissionAdd(ver string) gin.HandlerFunc
- func RolePermissionList(ver string) gin.HandlerFunc
- func RoleShow(ver string) gin.HandlerFunc
- func RoleUpdate(ver string) gin.HandlerFunc
- func RoleUserList(ver string) gin.HandlerFunc
- func SUCCESS() util.Map
- func Success(ctx *gin.Context, detail interface{})
- func User(ctx *gin.Context) *model.User
- func UserAdd(ver string) gin.HandlerFunc
- func UserDelete(ver string) gin.HandlerFunc
- func UserList(ver string) gin.HandlerFunc
- func UserLogin(ver string) gin.HandlerFunc
- func UserMenuAdd(ver string) gin.HandlerFunc
- func UserMenuDelete(ver string) gin.HandlerFunc
- func UserMenuList(ver string) gin.HandlerFunc
- func UserMenuShow(ver string) gin.HandlerFunc
- func UserMenuUpdate(ver string) gin.HandlerFunc
- func UserPermissionList(ver string) gin.HandlerFunc
- func UserPropertyAdd(ver string) gin.HandlerFunc
- func UserPropertyDelete(ver string) gin.HandlerFunc
- func UserPropertyList(ver string) gin.HandlerFunc
- func UserPropertyShow(ver string) gin.HandlerFunc
- func UserPropertyUpdate(ver string) gin.HandlerFunc
- func UserRegister(ver string) gin.HandlerFunc
- func UserReset(ver string) gin.HandlerFunc
- func UserRoleAdd(ver string) gin.HandlerFunc
- func UserRoleList(ver string) gin.HandlerFunc
- func UserShow(ver string) gin.HandlerFunc
- func UserUpdate(ver string) gin.HandlerFunc
- func XMLResponse(w http.ResponseWriter, data []byte) error
- type CodeMessage
- type Notifier
- type Notify
- func (n *Notify) HandlePaidNotify(f ServeNotify) Notifier
- func (n *Notify) HandleRefunded(f ServeNotify) Notifier
- func (n *Notify) HandleRefundedNotify(f ServeNotify) ServeHTTPFunc
- func (n *Notify) HandleScanned(f ServeNotify) ServeHTTPFunc
- func (n *Notify) HandleScannedNotify(f ServeNotify) Notifier
- type ServeHTTPFunc
- type ServeNotify
Constants ¶
const ContentType = "Accept"
ContentType ...
const ContentTypeJSON = "application/json"
ContentTypeJSON ...
const ContentTypeXML = "application/xml"
ContentTypeXML ...
Variables ¶
This section is empty.
Functions ¶
func ActivityAdd ¶
func ActivityAdd(ver string) gin.HandlerFunc
ActivityAdd godoc @Summary Add activity @Description Add activity @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param account body Activity true "activity update info" @success 200 {object} model.Activity @Failure 400 {object} controller.CodeMessage @Router /admin/activity [post]
func ActivityDelete ¶
func ActivityDelete(ver string) gin.HandlerFunc
ActivityDelete godoc @Summary Delete activity @Description Delete activity @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Activity ID" @success 200 {object} model.Activity @Failure 400 {object} controller.CodeMessage @Router /admin/activity/{id} [delete]
func ActivityList ¶
func ActivityList(ver string) gin.HandlerFunc
ActivityList godoc @Summary List activities @Description List activities @Tags admin @Accept json @Produce json @Param token header string true "login token" @success 200 {array} model.Activity @Failure 400 {object} controller.CodeMessage @Router /admin/activity [get]
func ActivityShow ¶
func ActivityShow(ver string) gin.HandlerFunc
ActivityShow godoc @Summary Show activity @Description Show activity @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Activity ID" @success 200 {object} model.Activity @Failure 400 {object} controller.CodeMessage @Router /admin/activity/{id} [get]
func ActivityUpdate ¶
func ActivityUpdate(ver string) gin.HandlerFunc
ActivityUpdate godoc @Summary Update activity @Description Update activity @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Activity ID" @Param account body Activity true "activity update info" @success 200 {object} model.Activity @Failure 400 {object} controller.CodeMessage @Router /admin/activity/{id} [post]
func ActivityUserList ¶
func ActivityUserList(ver string) gin.HandlerFunc
ActivityUserList godoc @Summary List activity @Description List activity @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Activity ID" @success 200 {array} model.User @Failure 400 {object} controller.CodeMessage @Router /admin/activity/{id}/user [get]
func NotifyPaymentUnify ¶
func NotifyPaymentUnify(ver string) gin.HandlerFunc
NotifyPaymentUnify godoc @Summary List permission @Description List permission @Tags payment @Accept json @Produce json @Param token header string true "login token" @Param path query string true "sign" @Param payType query string true "payType" @success 200 {array} model.User @Failure 400 {object} controller.CodeMessage @Router /payment/{sign}/{payType} [post]
func PermissionAdd ¶
func PermissionAdd(ver string) gin.HandlerFunc
PermissionAdd godoc @Summary Add permission @Description Add permission @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param account body Permission true "permission update info" @success 200 {object} model.Permission @Failure 400 {object} controller.CodeMessage @Router /admin/permission [post]
func PermissionDelete ¶
func PermissionDelete(ver string) gin.HandlerFunc
PermissionDelete godoc @Summary Delete permission @Description Delete permission @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Permission ID" @success 200 {object} model.Permission @Failure 400 {object} controller.CodeMessage @Router /admin/permission/{id} [delete]
func PermissionList ¶
func PermissionList(ver string) gin.HandlerFunc
PermissionList godoc @Summary List permissions @Description List permissions @Tags admin @Accept json @Produce json @Param token header string true "login token" @success 200 {array} model.Permission @Failure 400 {object} controller.CodeMessage @Router /admin/permission [get]
func PermissionRoleList ¶
func PermissionRoleList(ver string) gin.HandlerFunc
PermissionRoleList godoc @Summary List role @Description List role @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Permission ID" @success 200 {array} model.Role @Failure 400 {object} controller.CodeMessage @Router /admin/permission/{id}/role [get]
func PermissionShow ¶
func PermissionShow(ver string) gin.HandlerFunc
PermissionShow godoc @Summary Show permission @Description Show permission @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Permission ID" @success 200 {object} model.Permission @Failure 400 {object} controller.CodeMessage @Router /admin/permission/{id} [get]
func PermissionUpdate ¶
func PermissionUpdate(ver string) gin.HandlerFunc
PermissionUpdate godoc @Summary Update permission @Description Update permission @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Permission ID" @Param account body Permission true "permission update info" @success 200 {object} model.Permission @Failure 400 {object} controller.CodeMessage @Router /admin/permission/{id} [post]
func PermissionUserList ¶
func PermissionUserList(ver string) gin.HandlerFunc
PermissionUserList godoc @Summary List permission @Description List permission @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Permission ID" @success 200 {array} model.User @Failure 400 {object} controller.CodeMessage @Router /admin/permission/{id}/user [get]
func PropertyAdd ¶
func PropertyAdd(ver string) gin.HandlerFunc
PropertyAdd godoc @Summary Add property @Description Add property @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param account body Properties true "property update info" @success 200 {object} model.Property @Failure 400 {object} controller.CodeMessage @Router /admin/property [post]
func PropertyDelete ¶
func PropertyDelete(ver string) gin.HandlerFunc
PropertyDelete godoc @Summary Delete property @Description Delete property @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Properties ID" @success 200 {object} model.Property @Failure 400 {object} controller.CodeMessage @Router /admin/property/{id} [delete]
func PropertyList ¶
func PropertyList(ver string) gin.HandlerFunc
PropertyList godoc @Summary List propertys @Description List propertys @Tags admin @Accept json @Produce json @Param token header string true "login token" @success 200 {array} model.Property @Failure 400 {object} controller.CodeMessage @Router /admin/property [get]
func PropertyShow ¶
func PropertyShow(ver string) gin.HandlerFunc
PropertyShow godoc @Summary Show property @Description Show property @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Properties ID" @success 200 {object} model.Property @Failure 400 {object} controller.CodeMessage @Router /admin/property/{id} [get]
func PropertyUpdate ¶
func PropertyUpdate(ver string) gin.HandlerFunc
PropertyUpdate godoc @Summary Update property @Description Update property @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Properties ID" @Param account body Properties true "property update info" @success 200 {object} model.Property @Failure 400 {object} controller.CodeMessage @Router /admin/property/{id} [post]
func RoleAdd ¶
func RoleAdd(ver string) gin.HandlerFunc
RoleAdd godoc @Summary Add role @Description Add role @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param account body Role true "role update info" @success 200 {object} model.Role @Failure 400 {object} controller.CodeMessage @Router /admin/role [post]
func RoleDelete ¶
func RoleDelete(ver string) gin.HandlerFunc
RoleDelete godoc @Summary Delete role @Description Delete role @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Role ID" @success 200 {object} model.Role @Failure 400 {object} controller.CodeMessage @Router /admin/role/{id} [delete]
func RoleList ¶
func RoleList(ver string) gin.HandlerFunc
RoleList godoc @Summary List roles @Description List roles @Tags admin @Accept json @Produce json @Param token header string true "login token" @success 200 {array} model.Role @Failure 400 {object} controller.CodeMessage @Router /admin/role [get]
func RolePermissionAdd ¶
func RolePermissionAdd(ver string) gin.HandlerFunc
RolePermissionAdd godoc @Summary add permission @Description add permission @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Role ID" @Param pid path string true "Permission ID" @success 200 {array} model.PermissionRole @Failure 400 {object} controller.CodeMessage @Router /admin/role/{id}/permission/{pid} [get]
func RolePermissionList ¶
func RolePermissionList(ver string) gin.HandlerFunc
RolePermissionList godoc @Summary List permission @Description List permission @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Role ID" @success 200 {array} model.Permission @Failure 400 {object} controller.CodeMessage @Router /admin/role/{id}/permission [get]
func RoleShow ¶
func RoleShow(ver string) gin.HandlerFunc
RoleShow godoc @Summary Show role @Description Show role @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Role ID" @success 200 {object} model.Role @Failure 400 {object} controller.CodeMessage @Router /admin/role/{id} [get]
func RoleUpdate ¶
func RoleUpdate(ver string) gin.HandlerFunc
RoleUpdate godoc @Summary Update role @Description Update role @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Role ID" @Param account body Role true "role update info" @success 200 {object} model.Role @Failure 400 {object} controller.CodeMessage @Router /admin/role/{id} [post]
func RoleUserList ¶
func RoleUserList(ver string) gin.HandlerFunc
RoleUserList godoc @Summary List permission @Description List permission @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Role ID" @success 200 {array} model.User @Failure 400 {object} controller.CodeMessage @Router /admin/role/{id}/user [get]
func UserAdd ¶
func UserAdd(ver string) gin.HandlerFunc
UserAdd godoc @Summary Add user @Description Add user @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param account body User true "user update info" @success 200 {object} model.User @Failure 400 {object} controller.CodeMessage @Router /admin/user [post]
func UserDelete ¶
func UserDelete(ver string) gin.HandlerFunc
UserDelete godoc @Summary Delete user @Description Delete user @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "User ID" @success 200 {object} model.User @Failure 400 {object} controller.CodeMessage @Router /admin/user/{id} [delete]
func UserList ¶
func UserList(ver string) gin.HandlerFunc
UserList godoc @Summary List users @Description List users @Tags admin @Accept json @Produce json @Param token header string true "login token" @success 200 {array} model.Paginate @Failure 400 {object} controller.CodeMessage @Router /admin/user [get]
func UserLogin ¶
func UserLogin(ver string) gin.HandlerFunc
UserLogin godoc @Summary Login user @Description Login user @Tags default @Accept json @Produce json @Param account body Login true "user update info" @success 200 {object} util.WebToken @Failure 400 {object} controller.CodeMessage @Router /login [post]
func UserMenuAdd ¶
func UserMenuAdd(ver string) gin.HandlerFunc
UserMenuAdd godoc @Summary Add user menu @Description Add user menu @Tags menu @Accept json @Produce json @Param token header string true "login token" @Param account body Properties true "menu update info" @success 200 {object} model.Menu @Failure 400 {object} controller.CodeMessage @Router /user/menu [post]
func UserMenuDelete ¶
func UserMenuDelete(ver string) gin.HandlerFunc
UserMenuDelete godoc @Summary Delete user menu @Description Delete user menu @Tags menu @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Properties ID" @success 200 {object} model.Menu @Failure 400 {object} controller.CodeMessage @Router /user/menu/{id} [delete]
func UserMenuList ¶
func UserMenuList(ver string) gin.HandlerFunc
UserMenuList godoc @Summary List user properties @Description List user properties @Tags menu @Accept json @Produce json @Param current query string false "paginate:current" @Param limit query string false "paginate:limit" @Param order query string false "paginate:order" @success 200 {array} model.Menu @Failure 400 {object} controller.CodeMessage @Router /user/menu [get]
func UserMenuShow ¶
func UserMenuShow(ver string) gin.HandlerFunc
UserMenuShow godoc @Summary Show user menu @Description Show user menu @Tags menu @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Properties ID" @success 200 {object} model.Menu @Failure 400 {object} controller.CodeMessage @Router /user/menu/{id} [get]
func UserMenuUpdate ¶
func UserMenuUpdate(ver string) gin.HandlerFunc
UserMenuUpdate godoc @Summary Update user menu @Description Update user menu @Tags menu @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Properties ID" @Param account body Properties true "menu update info" @success 200 {object} model.Menu @Failure 400 {object} controller.CodeMessage @Router /user/menu/{id} [post]
func UserPermissionList ¶
func UserPermissionList(ver string) gin.HandlerFunc
UserPermissionList godoc @Summary List permission @Description List permission @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "User ID" @success 200 {array} model.Permission @Failure 400 {object} controller.CodeMessage @Router /admin/user/{id}/permission [get]
func UserPropertyAdd ¶
func UserPropertyAdd(ver string) gin.HandlerFunc
UserPropertyAdd godoc @Summary Add user property @Description Add user property @Tags property @Accept json @Produce json @Param token header string true "login token" @Param account body Properties true "property update info" @success 200 {object} model.Property @Failure 400 {object} controller.CodeMessage @Router /user/property [post]
func UserPropertyDelete ¶
func UserPropertyDelete(ver string) gin.HandlerFunc
UserPropertyDelete godoc @Summary Delete user property @Description Delete user property @Tags property @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Properties ID" @success 200 {object} model.Property @Failure 400 {object} controller.CodeMessage @Router /user/property/{id} [delete]
func UserPropertyList ¶
func UserPropertyList(ver string) gin.HandlerFunc
UserPropertyList godoc @Summary List user properties @Description List user properties @Tags property @Accept json @Produce json @Param token header string true "login token" @success 200 {array} model.Property @Failure 400 {object} controller.CodeMessage @Router /user/property [get]
func UserPropertyShow ¶
func UserPropertyShow(ver string) gin.HandlerFunc
UserPropertyShow godoc @Summary Show user property @Description Show user property @Tags property @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Properties ID" @success 200 {object} model.Property @Failure 400 {object} controller.CodeMessage @Router /user/property/{id} [get]
func UserPropertyUpdate ¶
func UserPropertyUpdate(ver string) gin.HandlerFunc
UserPropertyUpdate godoc @Summary Update user property @Description Update user property @Tags property @Accept json @Produce json @Param token header string true "login token" @Param id path string true "Properties ID" @Param account body Properties true "property update info" @success 200 {object} model.Property @Failure 400 {object} controller.CodeMessage @Router /user/property/{id} [post]
func UserRegister ¶
func UserRegister(ver string) gin.HandlerFunc
UserRegister godoc @Summary register user @Description register user @Tags default @Accept json @Produce json @Param account body User true "user update info" @success 200 {object} util.WebToken @Failure 400 {object} controller.CodeMessage @Router /register [post]
func UserReset ¶
func UserReset(ver string) gin.HandlerFunc
UserReset godoc @Summary reset user password @Description reset user password @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "User ID" @Param account body User true "user update info" @success 200 {object} model.User @Failure 400 {object} controller.CodeMessage @Router /admin/user/{id}/reset [post]
func UserRoleAdd ¶
func UserRoleAdd(ver string) gin.HandlerFunc
UserRoleAdd godoc @Summary List role @Description List role @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "User ID" @success 200 {array} model.RoleUser @Failure 400 {object} controller.CodeMessage @Router /admin/user/{id}/role/{rid} [post]
func UserRoleList ¶
func UserRoleList(ver string) gin.HandlerFunc
UserRoleList godoc @Summary List role @Description List role @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "User ID" @success 200 {array} model.Role @Failure 400 {object} controller.CodeMessage @Router /admin/user/{id}/role [get]
func UserShow ¶
func UserShow(ver string) gin.HandlerFunc
UserShow godoc @Summary Show user @Description Show user @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "User ID" @success 200 {object} model.User @Failure 400 {object} controller.CodeMessage @Router /admin/user/{id} [get]
func UserUpdate ¶
func UserUpdate(ver string) gin.HandlerFunc
UserUpdate godoc @Summary Update user @Description Update user @Tags admin @Accept json @Produce json @Param token header string true "login token" @Param id path string true "User ID" @Param account body User true "user update info" @success 200 {object} model.User @Failure 400 {object} controller.CodeMessage @Router /admin/user/{id} [post]
Types ¶
type CodeMessage ¶
type CodeMessage struct { Code int `json:"code" example:"-1"` Message string `json:"message" example:"status bad request"` }
CodeMessage ...
type Notify ¶
type Notify struct { RefundKey string // contains filtered or unexported fields }
Notify ...
func (*Notify) HandlePaidNotify ¶
func (n *Notify) HandlePaidNotify(f ServeNotify) Notifier
HandlePaidNotify ...
func (*Notify) HandleRefunded ¶
func (n *Notify) HandleRefunded(f ServeNotify) Notifier
HandleRefunded ...
func (*Notify) HandleRefundedNotify ¶
func (n *Notify) HandleRefundedNotify(f ServeNotify) ServeHTTPFunc
HandleRefundedNotify ...
func (*Notify) HandleScanned ¶
func (n *Notify) HandleScanned(f ServeNotify) ServeHTTPFunc
HandleScanned ...
func (*Notify) HandleScannedNotify ¶
func (n *Notify) HandleScannedNotify(f ServeNotify) Notifier
HandleScannedNotify ...