Documentation ¶
Index ¶
- func ApplyBg(userID, bgID, cardID string) error
- func BuyBg(userID, userName, bgID string) error
- func ChangeNotice(userID string) error
- func CollectBg(userID, bgID string) error
- func CompleteTask(userID string, taskID string) error
- func CreateActivity(req *CreateActivityRequest) error
- func CreateBg(req *CreateBgRequest) error
- func CreateRechargeGoods(params CreateRechargeGoodsRequest) error
- func CreateTag(name string) error
- func CreateTask(params CreateTaskRequest) error
- func DeleteActivity(tangentID string, id string) error
- func DeleteBg(id string) error
- func DeleteRechargeGoods(id string) error
- func DeleteTag(id string) error
- func DeleteTask(id string) error
- func Destroy()
- func GetBgUrl(objName string) (string, error)
- func GetRewardTypes() ([]string, error)
- func GetUserBonusPoints(userID string) (int64, error)
- func Init(baseUrl string, timeoutSec time.Duration)
- func IsBuyBg(userID, bgID string) (bool, error)
- func IsCollectBg(userID, bgID string) (bool, error)
- func IssueActivityReward(userID, userName, activityID string) error
- func NotifyOrder(outTradeNo string, resultCode string, errCodeDes string) error
- func ReceiveAllTaskReward(userID string) error
- func SignIn(userID string) (int64, error)
- func UpdateActivity(req *UpdateActivityRequest) error
- func UpdateBg(req *UpdateBgRequest) error
- func UpdateRechargeGoods(params UpdateRechargeGoodsRequest) error
- func UpdateTag(id, name string) error
- func UpdateTask(params UpdateTaskRequest) error
- func UploadBg(header *multipart.FileHeader) (string, string, error)
- func UploadRechargeGoodsPic(f *multipart.FileHeader) (string, string, error)
- func UploadTaskPic(f *multipart.FileHeader) (string, string, error)
- type ActivitiesResponse
- type ActivityInfo
- type AddBgToTagRequest
- type ApplyBgRequest
- type BgInfo
- func GetBg(id, keyword, tagID string, onShelf, official *bool, pageNo, pageSize int) ([]BgInfo, int64, error)
- func GetCollect(userID, tagID, keyword string, pageNo, pageSize int) ([]BgInfo, int64, error)
- func GetTagBg(tagID, keyword string, pageNo, pageSize int) ([]BgInfo, int64, error)
- func HotBg(pageNo, pageSize int) ([]BgInfo, int64, error)
- type BgPicInfo
- type BgPurchaseRecordQuery
- type BgPurchaseRecordResponse
- type BgRecordInfo
- type BonusPointsRankingInfo
- type BuyBgRequest
- type ChangeNoticeRequest
- type CollectBgRequest
- type CompleteUserTaskRequest
- type ConfigDayBonusPointsRequest
- type ConsecutiveDaysRankingInfo
- type CreateActivityRequest
- type CreateBgRequest
- type CreateOrderRequest
- type CreateOrderResponse
- type CreateRechargeGoodsRequest
- type CreateTagRequest
- type CreateTaskRequest
- type GetActivityResponse
- type GetBgQuery
- type GetBgResponse
- type GetBgUrlResponse
- type GetBonusPointsDetailResponse
- type GetBonusPointsRankingResponse
- type GetCollectResponse
- type GetConsecutiveDaysRankingResponse
- type GetOrdersResponse
- type GetRechargeGoodsResponse
- type GetRewardTypesResponse
- type GetSignConfigResponse
- type GetSignInfoResponse
- type GetTagBgQuery
- type GetTagBgResponse
- type GetTagQuery
- type GetTagResponse
- type GetTaskConfigResponse
- type GetUserBonusPointsResponse
- type GetUserJoinActivityInfoResponse
- type GetUserPendantResponse
- type GetUserTasksResponse
- type HotBgQuery
- type HotBgResponse
- type IsBuyBgResponse
- type IsCollectBgResponse
- type IssueActivityRewardRequest
- type NotifyOrderRequest
- type OrderInfo
- type PicInfo
- type ReceiveAllTaskRewardRequest
- type RechargeGoodsInfo
- type RechargeOrderInfo
- type RewardInfo
- type RewardSetting
- type SignConfigInfo
- type SignInRequest
- type SignInResponse
- type StartUserTaskRequest
- type TagInfo
- type TagPic
- type TaskConfigInfo
- type UpdateActivityRequest
- type UpdateBgRequest
- type UpdateRechargeGoodsRequest
- type UpdateTagRequest
- type UpdateTaskRequest
- type UploadBgRequest
- type UploadBgResponse
- type UploadGoodsPicResponse
- type UploadTaskPicResponse
- type UserBonusPointsDetailInfo
- type UserJoinActivityInfo
- type UserPendantInfo
- type UserSignInfo
- type UserTaskInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeNotice ¶
func CompleteTask ¶
func CreateActivity ¶ added in v0.4.0
func CreateActivity(req *CreateActivityRequest) error
func CreateBg ¶ added in v0.6.0
func CreateBg(req *CreateBgRequest) error
func CreateRechargeGoods ¶
func CreateRechargeGoods(params CreateRechargeGoodsRequest) error
func CreateTask ¶
func CreateTask(params CreateTaskRequest) error
func DeleteActivity ¶ added in v0.4.0
func DeleteRechargeGoods ¶
func DeleteTask ¶
func GetRewardTypes ¶
func GetUserBonusPoints ¶
func IsCollectBg ¶ added in v0.6.0
func IssueActivityReward ¶ added in v0.7.0
func ReceiveAllTaskReward ¶
func UpdateActivity ¶ added in v0.4.0
func UpdateActivity(req *UpdateActivityRequest) error
func UpdateBg ¶ added in v0.6.0
func UpdateBg(req *UpdateBgRequest) error
func UpdateRechargeGoods ¶
func UpdateRechargeGoods(params UpdateRechargeGoodsRequest) error
func UpdateTask ¶
func UpdateTask(params UpdateTaskRequest) error
func UploadRechargeGoodsPic ¶
func UploadRechargeGoodsPic(f *multipart.FileHeader) (string, string, error)
func UploadTaskPic ¶
func UploadTaskPic(f *multipart.FileHeader) (string, string, error)
Types ¶
type ActivitiesResponse ¶ added in v0.7.0
type ActivitiesResponse struct { Infos []ActivityInfo `json:"infos"` // contains filtered or unexported fields }
type ActivityInfo ¶ added in v0.4.0
type ActivityInfo struct { TangentID string `json:"tangentId"` ID string `json:"id"` Name string `json:"name"` Scope string `json:"scope"` Start string `json:"start"` End string `json:"end"` CreateTime string `json:"createTime"` ScopeType uint8 `json:"scopeType"` Status uint8 `json:"status"` BusinessLogic uint8 `json:"businessLogic"` JoinLimit int `json:"joinLimit"` Rewards []RewardInfo `json:"rewards"` }
func GetActivities ¶ added in v0.4.0
func GetActivities(tangentID, id, name, start, end string, pageNo, pageSize int) ([]ActivityInfo, int64, error)
func InProgressActivity ¶ added in v0.4.0
func InProgressActivity() ([]ActivityInfo, error)
func UserCanJoinActivities ¶ added in v0.7.0
func UserCanJoinActivities(userID string, tangentIDs []string, rewardFilter uint8) ([]ActivityInfo, error)
type AddBgToTagRequest ¶ added in v0.6.0
type ApplyBgRequest ¶ added in v0.7.0
type BgInfo ¶ added in v0.6.0
type BgInfo struct { ID string `json:"id"` Topic string `json:"topic"` Cost int `json:"cost"` CostType uint8 `json:"costType"` Desc string `json:"desc"` CreateTime string `json:"createTime"` UserID string `json:"userId"` Official bool `json:"official"` OnShelf bool `json:"onShelf"` Front string `json:"front"` Back string `json:"back"` Demo string `json:"demo"` CollectNum int64 `json:"collectNum"` BuyNum int64 `json:"buyNum"` Tags []TagInfo `json:"tags"` }
func GetCollect ¶ added in v0.7.0
type BgPurchaseRecordQuery ¶ added in v0.6.0
type BgPurchaseRecordResponse ¶ added in v0.6.0
type BgPurchaseRecordResponse struct { Infos []BgRecordInfo `json:"infos"` TotalCount int64 `json:"totalCount"` PageNo int `json:"pageNo"` // contains filtered or unexported fields }
type BgRecordInfo ¶ added in v0.6.0
type BgRecordInfo struct { ID string `json:"id"` UserID string `json:"userId"` UserName string `json:"userName"` BgID string `json:"bgId"` BgTopic string `json:"bgTopic"` Cost int `json:"cost"` CostType uint8 `json:"costType"` CreateTime string `json:"createTime"` Way uint8 `json:"way"` Front string `json:"front"` Back string `json:"back"` Demo string `json:"demo"` Apply bool `json:"apply"` }
func BgPurchaseRecord ¶ added in v0.6.0
func BgPurchaseRecord(userID string, pageNo, pageSize int) ([]BgRecordInfo, int64, error)
type BonusPointsRankingInfo ¶
type BonusPointsRankingInfo struct { ID int `json:"id"` UserID string `json:"userId"` BonusPoints int64 `json:"bonusPoints"` }
func BonusPointsRanking ¶
func BonusPointsRanking(num int) ([]BonusPointsRankingInfo, error)
type BuyBgRequest ¶ added in v0.6.0
type ChangeNoticeRequest ¶
type ChangeNoticeRequest struct {
UserID string `json:"userId" binding:"required"`
}
type CollectBgRequest ¶ added in v0.6.0
type CompleteUserTaskRequest ¶
type ConsecutiveDaysRankingInfo ¶
type ConsecutiveDaysRankingInfo struct { ID int `json:"id"` UserID string `json:"userId"` ConsecutiveDays int `json:"consecutiveDays"` }
func GetConsecutiveDaysRanking ¶
func GetConsecutiveDaysRanking(num int) ([]ConsecutiveDaysRankingInfo, error)
type CreateActivityRequest ¶ added in v0.4.0
type CreateActivityRequest struct { TangentID string `json:"tangentId"` Name string `json:"name"` Scope string `json:"scope"` Start string `json:"start"` End string `json:"end"` ScopeType uint8 `json:"scopeType"` JoinLimit int `json:"joinLimit"` BusinessLogic uint8 `json:"businessLogic"` RewardSettings []RewardSetting `json:"rewardSettings"` }
type CreateBgRequest ¶ added in v0.6.0
type CreateBgRequest struct { Topic string `json:"topic"` Cost int `json:"cost"` CostType uint8 `json:"costType"` Desc string `json:"desc"` UserID string `json:"userId"` Official bool `json:"official"` OnShelf bool `json:"onShelf"` Front string `json:"front"` Back string `json:"back"` Demo string `json:"demo"` TagIDs []string `json:"tagIds"` }
type CreateOrderRequest ¶
type CreateOrderResponse ¶
type CreateOrderResponse struct { Info *RechargeOrderInfo `json:"info"` // contains filtered or unexported fields }
type CreateTagRequest ¶ added in v0.6.0
type CreateTagRequest struct {
Name string `json:"name"`
}
type CreateTaskRequest ¶
type CreateTaskRequest struct { TaskName string `json:"taskName"` TaskDetail string `json:"taskDetail"` CompleteTimes uint8 `json:"completeTimes"` JumpType uint8 `json:"jumpType"` JumpAddr string `json:"jumpAddr"` EndTime string `json:"endTime"` RewardType uint8 `json:"rewardType"` TaskType uint8 `json:"taskType"` RewardNum int64 `json:"rewardNum"` Url string `json:"url"` }
type GetActivityResponse ¶ added in v0.4.0
type GetActivityResponse struct { Infos []ActivityInfo `json:"infos"` TotalCount int64 `json:"totalCount"` PageNo int `json:"pageNo"` // contains filtered or unexported fields }
type GetBgQuery ¶ added in v0.6.0
type GetBgResponse ¶ added in v0.6.0
type GetBgUrlResponse ¶ added in v0.7.0
type GetBgUrlResponse struct { Url string `json:"url"` // contains filtered or unexported fields }
type GetBonusPointsDetailResponse ¶
type GetBonusPointsDetailResponse struct { Infos []UserBonusPointsDetailInfo `json:"infos"` TotalCount int64 `json:"totalCount"` PageNo int `json:"pageNo"` // contains filtered or unexported fields }
type GetBonusPointsRankingResponse ¶
type GetBonusPointsRankingResponse struct { Infos []BonusPointsRankingInfo `json:"infos"` // contains filtered or unexported fields }
type GetCollectResponse ¶ added in v0.7.0
type GetConsecutiveDaysRankingResponse ¶
type GetConsecutiveDaysRankingResponse struct { Infos []ConsecutiveDaysRankingInfo `json:"infos"` // contains filtered or unexported fields }
type GetOrdersResponse ¶
type GetRechargeGoodsResponse ¶
type GetRechargeGoodsResponse struct { Infos []RechargeGoodsInfo `json:"infos"` TotalCount int64 `json:"totalCount"` PageNo int `json:"pageNo"` // contains filtered or unexported fields }
type GetRewardTypesResponse ¶
type GetRewardTypesResponse struct { Types []string `json:"types"` // contains filtered or unexported fields }
type GetSignConfigResponse ¶
type GetSignConfigResponse struct { Infos []SignConfigInfo `json:"infos"` // contains filtered or unexported fields }
type GetSignInfoResponse ¶
type GetSignInfoResponse struct { Infos []UserSignInfo `json:"infos"` TotalCount int64 `json:"totalCount"` PageNo int `json:"pageNo"` // contains filtered or unexported fields }
type GetTagBgQuery ¶ added in v0.6.0
type GetTagBgResponse ¶ added in v0.6.0
type GetTagQuery ¶ added in v0.6.0
type GetTagResponse ¶ added in v0.6.0
type GetTaskConfigResponse ¶
type GetTaskConfigResponse struct { Infos []TaskConfigInfo `json:"infos"` TotalCount int64 `json:"totalCount"` PageNo int `json:"pageNo"` // contains filtered or unexported fields }
type GetUserBonusPointsResponse ¶
type GetUserBonusPointsResponse struct { BonusPoints int64 `json:"bonusPoints"` // contains filtered or unexported fields }
type GetUserJoinActivityInfoResponse ¶ added in v0.4.0
type GetUserJoinActivityInfoResponse struct { Infos []UserJoinActivityInfo `json:"infos"` // contains filtered or unexported fields }
type GetUserPendantResponse ¶ added in v0.5.1
type GetUserPendantResponse struct { Info *UserPendantInfo `json:"info"` // contains filtered or unexported fields }
type GetUserTasksResponse ¶
type GetUserTasksResponse struct { Infos []UserTaskInfo `json:"infos"` // contains filtered or unexported fields }
type HotBgQuery ¶ added in v0.6.0
type HotBgResponse ¶ added in v0.6.0
type IsBuyBgResponse ¶ added in v0.7.0
type IsBuyBgResponse struct { Bought bool `json:"bought"` // contains filtered or unexported fields }
type IsCollectBgResponse ¶ added in v0.6.0
type IsCollectBgResponse struct { Collected bool `json:"collected"` // contains filtered or unexported fields }
type IssueActivityRewardRequest ¶ added in v0.7.0
type NotifyOrderRequest ¶
type OrderInfo ¶
type OrderInfo struct { ID string `json:"id"` UserID string `json:"userId"` UserName string `json:"userName"` UserPhone string `json:"userPhone"` GoodsID string `json:"goodsId"` GoodsName string `json:"goodsName"` GoodsPrice float64 `json:"goodsPrice"` BonusPoints int64 `json:"bonusPoints"` OpenID string `json:"openId"` FailReason string `json:"failReason"` State uint8 `json:"state"` CreateTime string `json:"createTime"` }
type ReceiveAllTaskRewardRequest ¶
type ReceiveAllTaskRewardRequest struct {
UserID string `json:"userId"`
}
type RechargeGoodsInfo ¶
type RechargeGoodsInfo struct { ID string `json:"id"` Title string `json:"title"` SubTitle string `json:"subTitle"` Discount string `json:"discount"` Price float64 `json:"price"` BonusPoints int64 `json:"bonusPoints"` Sort int `json:"sort"` Url string `json:"url"` }
func GetRechargeGoods ¶
func GetRechargeGoods(pageNo int, pageSize int) ([]RechargeGoodsInfo, int64, error)
type RechargeOrderInfo ¶
type RewardInfo ¶ added in v0.4.0
type RewardSetting ¶ added in v0.4.0
type SignConfigInfo ¶
type SignConfigInfo struct { Day int `json:"day,omitempty"` BonusPoints int `json:"bonusPoints,omitempty"` }
func GetSignConfig ¶
func GetSignConfig(day int) ([]SignConfigInfo, error)
type SignInRequest ¶
type SignInRequest struct {
UserID string `json:"userId" binding:"required"`
}
type SignInResponse ¶
type SignInResponse struct { BonusPoints int64 `json:"bonusPoints"` // contains filtered or unexported fields }
type StartUserTaskRequest ¶
type TagInfo ¶ added in v0.6.0
type TaskConfigInfo ¶
type TaskConfigInfo struct { ID string `json:"id"` TaskName string `json:"taskName"` TaskDetail string `json:"taskDetail"` CompleteTimes uint8 `json:"completeTimes"` JumpType uint8 `json:"jumpType"` JumpAddr string `json:"jumpAddr"` EndTime string `json:"endTime"` RewardType uint8 `json:"rewardType"` TaskType uint8 `json:"taskType"` Url string `json:"url"` RewardNum int64 `json:"rewardNum"` }
type UpdateActivityRequest ¶ added in v0.4.0
type UpdateActivityRequest struct { TangentID string `json:"tangentId"` ID string `json:"id"` Name string `json:"name"` Scope string `json:"scope"` Start string `json:"start"` End string `json:"end"` ScopeType uint8 `json:"scopeType"` BusinessLogic uint8 `json:"businessLogic"` RewardSettings []RewardSetting `json:"rewardSettings"` }
type UpdateBgRequest ¶ added in v0.6.0
type UpdateBgRequest struct { ID string `json:"id"` Topic string `json:"topic"` Cost int `json:"cost"` CostType uint8 `json:"costType"` Desc string `json:"desc"` UserID string `json:"userId"` Official *bool `json:"official"` OnShelf *bool `json:"onShelf"` Front string `json:"front"` Back string `json:"back"` Demo string `json:"demo"` TagIDs []string `json:"tagIds"` }
type UpdateTagRequest ¶ added in v0.6.0
type UpdateTaskRequest ¶
type UpdateTaskRequest struct { ID string `json:"id"` TaskName string `json:"taskName"` TaskDetail string `json:"taskDetail"` CompleteTimes int `json:"completeTimes"` JumpType uint8 `json:"jumpType"` JumpAddr string `json:"jumpAddr"` EndTime string `json:"endTime"` TaskType uint8 `json:"taskType"` RewardType uint8 `json:"rewardType"` RewardNum int64 `json:"rewardNum"` Url string `json:"url"` }
type UploadBgRequest ¶ added in v0.6.0
type UploadBgRequest struct {
File *multipart.FileHeader `form:"file"`
}
type UploadBgResponse ¶ added in v0.6.0
type UploadBgResponse struct { Info *BgPicInfo `json:"info"` // contains filtered or unexported fields }
type UploadGoodsPicResponse ¶
type UploadTaskPicResponse ¶
type UploadTaskPicResponse struct { Info *PicInfo `json:"info"` // contains filtered or unexported fields }
type UserBonusPointsDetailInfo ¶
type UserBonusPointsDetailInfo struct { ID string `json:"id"` UserID string `json:"userId"` BonusPointsOffset int64 `json:"bonusPointsOffset"` ChangeType string `json:"changeType"` ChangeTime string `json:"changeTime"` }
func GetBonusPointsDetails ¶
type UserJoinActivityInfo ¶ added in v0.4.0
type UserJoinActivityInfo struct { UserID string `json:"userId"` ActivityID string `json:"activityId"` JoinNum int `json:"joinNum"` }
func GetUserJoinActivityInfo ¶ added in v0.4.0
func GetUserJoinActivityInfo(userID string, activityID string) ([]UserJoinActivityInfo, error)
type UserPendantInfo ¶ added in v0.5.1
type UserPendantInfo struct { UserID string `json:"userId"` PendantID string `json:"pendantId"` Term int `json:"term"` ObtainType uint8 `json:"obtainType"` Resource string `json:"resource"` Effect string `json:"effect"` CreateTime string `json:"createTime"` }
func GetUserPendant ¶ added in v0.5.1
func GetUserPendant(userID string) (*UserPendantInfo, error)
type UserSignInfo ¶
type UserSignInfo struct { UserID string `json:"userId"` ConsecutiveDays int `json:"consecutiveDays"` SevenDays int `json:"sevenDays"` Notice bool `json:"notice"` Signed bool `json:"signed"` }
func GetSignInfo ¶
func GetSignInfo(userID string, pageNo int, pageSize int) ([]UserSignInfo, error)
type UserTaskInfo ¶
type UserTaskInfo struct { ID string `json:"id"` TaskName string `json:"taskName"` TaskDetail string `json:"taskDetail"` JumpType uint8 `json:"jumpType"` JumpAddr string `json:"jumpAddr"` Complete bool `json:"complete"` Url string `json:"url"` }
func GetUserTasks ¶
func GetUserTasks(userID string, taskType uint8) ([]UserTaskInfo, error)
Click to show internal directories.
Click to hide internal directories.