Documentation
¶
Index ¶
- func BindArticleController(app *iris.Application)
- func BindCommentController(app *iris.Application)
- func BindFileController(app *iris.Application)
- func BindMessageController(app *iris.Application)
- func BindQuestionnaireController(app *iris.Application)
- func BindTaskController(app *iris.Application)
- func BindUserController(app *iris.Application)
- func BindUtilsController(app *iris.Application)
- func InitSession(config utils.SessionConfig, dbConfig utils.RedisConfig)
- func NewApp() *iris.Application
- type AddQuestionnaireReq
- type AddTaskReq
- type ArticleController
- type ArticleReq
- type ArticlesListRes
- type BaseController
- type CertificationController
- func (c *CertificationController) DeleteAutoBy(key string) int
- func (c *CertificationController) GetAuth() string
- func (c *CertificationController) GetAuto() int
- func (c *CertificationController) GetCertification() int
- func (c *CertificationController) Post() int
- func (c *CertificationController) PostAuto() int
- func (c *CertificationController) PostEmail() int
- func (c *CertificationController) PutUserBy(userID string) int
- type CommentController
- type DeleteUselessReq
- type FileController
- type FollowListRes
- type GetMessageRes
- type GetMessagesRes
- type GetSessionRes
- type GetSessionStatusRes
- type GetTasksReq
- type GetWeChatImageRes
- type LogsRes
- type MessageController
- type PaginationRes
- type PlayerListRes
- type PostAnswersReq
- type PostCertificationReq
- type PostCommentReq
- type PostMessageReq
- type PostPlayerReq
- type PostWechatReq
- type PostWechatRes
- type PutFileReq
- type PutUserInfoReq
- type PutUserReq
- type PutUserTypeReq
- type PutWechatReq
- type QuestionnaireController
- func (c *QuestionnaireController) GetBy(id string) int
- func (c *QuestionnaireController) GetByAnswers(id string) int
- func (c *QuestionnaireController) GetByQuestions(id string) int
- func (c *QuestionnaireController) PostBy(id string) int
- func (c *QuestionnaireController) PostByAnswers(id string) int
- func (c *QuestionnaireController) PostByQuestions(id string) int
- func (c *QuestionnaireController) PutBy(id string) int
- type QuestionsRes
- type SessionController
- type TaskController
- func (c *TaskController) DeleteBy(id string) int
- func (c *TaskController) DeleteByCollect(id string) int
- func (c *TaskController) DeleteByLike(id string) int
- func (c *TaskController) Get() int
- func (c *TaskController) GetBy(id string) int
- func (c *TaskController) GetByPlayer(id string) int
- func (c *TaskController) GetByPlayerBy(id, userIDString string) int
- func (c *TaskController) GetByWechat(id string) int
- func (c *TaskController) Post() int
- func (c *TaskController) PostByCollect(id string) int
- func (c *TaskController) PostByLike(id string) int
- func (c *TaskController) PostByPlayer(id string) int
- func (c *TaskController) PutBy(id string) int
- func (c *TaskController) PutByPlayerBy(id, userIDString string) int
- type TaskStatusReq
- type TasksListRes
- type TasksStatusListRes
- type UserController
- func (c *UserController) DeleteFollowingBy(id string) int
- func (c *UserController) DeleteHistory() int
- func (c *UserController) Get() int
- func (c *UserController) GetCollectBy(userIDString string) int
- func (c *UserController) GetFollowerBy(id string) int
- func (c *UserController) GetFollowingBy(id string) int
- func (c *UserController) GetHistory() int
- func (c *UserController) GetInfoBy(userID string) int
- func (c *UserController) GetTaskBy(userIDString string) int
- func (c *UserController) PostAttend() int
- func (c *UserController) PostFollowingBy(id string) int
- func (c *UserController) PostPay() int
- func (c *UserController) PutInfo() int
- func (c *UserController) PutTypeByID(userID string) int
- type UserListRes
- type UtilsController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindArticleController ¶
func BindArticleController(app *iris.Application)
func BindCommentController ¶
func BindCommentController(app *iris.Application)
BindCommentController 绑定评论API控制器
func BindMessageController ¶
func BindMessageController(app *iris.Application)
BindMessageController 绑定消息路由
func BindQuestionnaireController ¶
func BindQuestionnaireController(app *iris.Application)
BindQuestionnaireController 绑定问卷控制器
func BindUtilsController ¶
func BindUtilsController(app *iris.Application)
BindTaskController 绑定任务控制器
func InitSession ¶
func InitSession(config utils.SessionConfig, dbConfig utils.RedisConfig)
InitSession 初始化 Session
Types ¶
type AddQuestionnaireReq ¶
type AddQuestionnaireReq struct { Title string `json:"title"` Description string `json:"description"` Anonymous bool `json:"anonymous"` }
AddQuestionnaireReq 添加问卷请求
type AddTaskReq ¶
type AddTaskReq struct { Title string `json:"title"` Content string `json:"content"` Images []string `json:"images"` Attachment []string `json:"attachment"` Type string `json:"type"` Status string `json:"status"` Reward string `json:"reward"` RewardValue float32 `json:"reward_value"` RewardObject string `json:"reward_object"` Location []string `json:"location"` Tags []string `json:"tags"` StartDate int64 `json:"start_date"` EndDate int64 `json:"end_date"` MaxPlayer int64 `json:"max_player"` AutoAccept bool `json:"auto_accept"` Publish bool `json:"publish"` }
AddTaskReq 添加任务请求
type ArticleController ¶
type ArticleController struct { BaseController Service services.ArticleService }
func (*ArticleController) GetBy ¶
func (c *ArticleController) GetBy(id string) int
GetBy 根据ID获取公告文章详情
func (*ArticleController) SetBy ¶
func (c *ArticleController) SetBy(id string) int
SetBy 根据ID修改公告文章详情
type ArticleReq ¶
type ArticleReq struct { Title string `json:"title"` Content string `json:"content"` Publisher string `json:"publisher"` Images []string `json:"images"` }
ArticleReq 添加或修改公告文章请求
type ArticlesListRes ¶
type ArticlesListRes struct { Pagination PaginationRes Data []services.ArticleBrief }
GetArticlesRes 公告文章列表数据
type BaseController ¶
BaseController 控制基类
type CertificationController ¶
type CertificationController struct { BaseController Service services.UserService }
CertificationController 认证API
func (*CertificationController) DeleteAutoBy ¶
func (c *CertificationController) DeleteAutoBy(key string) int
DeleteAutoBy 删除自动认证前缀
func (*CertificationController) GetAuth ¶
func (c *CertificationController) GetAuth() string
GetAuth 验证认证链接
func (*CertificationController) GetAuto ¶
func (c *CertificationController) GetAuto() int
GetAuto 获取自动认证前缀
func (*CertificationController) GetCertification ¶
func (c *CertificationController) GetCertification() int
GetCertification 获取待审核认证列表
func (*CertificationController) PostAuto ¶
func (c *CertificationController) PostAuto() int
PostAuto 添加自动认证前缀
func (*CertificationController) PostEmail ¶
func (c *CertificationController) PostEmail() int
PostEmail 再次发送认证邮件
func (*CertificationController) PutUserBy ¶
func (c *CertificationController) PutUserBy(userID string) int
PutUserBy 更新认证
type CommentController ¶
type CommentController struct { BaseController Service services.CommentService }
CommentController 评论相关API
func (*CommentController) DeleteBy ¶
func (c *CommentController) DeleteBy(id string) int
DeleteBy 删除评论
func (*CommentController) DeleteByLike ¶
func (c *CommentController) DeleteByLike(id string) int
DeleteByLike 取消点赞
func (*CommentController) PostByLike ¶
func (c *CommentController) PostByLike(id string) int
PostByLike 评论点赞
type DeleteUselessReq ¶
type DeleteUselessReq struct {
RemoveCount int64
}
DeleteUselessReq 移除无用文件请求
type FileController ¶
type FileController struct { BaseController Service services.FileService }
FileController 文件相关API
func (*FileController) DeleteUseless ¶
func (c *FileController) DeleteUseless() int
DeleteUseless 删除用户未使用文件
func (*FileController) DeleteUselessAll ¶
func (c *FileController) DeleteUselessAll() int
DeleteUselessAll 删除所有未使用文件
type FollowListRes ¶
type FollowListRes struct { Pagination PaginationRes Data []models.UserBaseInfo }
FollowListRes 关注/粉丝列表数据
type GetMessageRes ¶
type GetMessageRes struct { Pagination PaginationRes Data services.SessionDetail }
GetMessageRes 获取会话消息数据
type GetMessagesRes ¶
type GetMessagesRes struct { Pagination PaginationRes Data []services.SessionListDetail }
GetMessagesRes 获取会话列表数据
type GetSessionStatusRes ¶
type GetSessionStatusRes struct {
Status string
}
GetSessionStatusRes 获取登陆状态返回值
type GetTasksReq ¶
type GetTasksReq struct { Page int Size int Sort string Type string Status string Reward string User string Keyword string }
GetTasksReq 获取任务列表请求
type MessageController ¶
type MessageController struct { BaseController Service services.MessageService }
MessageController 消息关API
func (*MessageController) GetUserBy ¶
func (c *MessageController) GetUserBy(id string) int
GetUserBy 获取会话消息
func (*MessageController) PostSystem ¶
func (c *MessageController) PostSystem() int
PostSystem 发送系统消息
type PaginationRes ¶
PaginationRes 分页数据结构
type PlayerListRes ¶
type PlayerListRes struct { Pagination PaginationRes Data []services.TaskStatus }
PlayerListRes 任务参与用户数据
type PostAnswersReq ¶
type PostAnswersReq struct {
Data []models.ProblemDataSchema `json:"data"`
}
PostAnswersReq 添加回答请求
type PostCertificationReq ¶
type PostCertificationReq struct { Identity models.UserIdentity Data string Type string Attachment []string Email string }
PostCertificationReq 申请认证请求
type PostCommentReq ¶
PostCommentReq 添加评论请求
type PostMessageReq ¶
PostMessageReq 发送消息请求
type PutFileReq ¶
PutFileReq 更新附件信息请求
type PutUserInfoReq ¶
type PutUserInfoReq struct { *models.UserInfoSchema AvatarURL string `json:"avatar_url"` }
PutUserInfoReq 修改用户信息请求
type PutUserReq ¶
PutUserReq 更新认证请求
type PutUserTypeReq ¶
type PutUserTypeReq struct {
Type string `json:"type"`
}
PutUserTypeReq 修改用户类型请求
type PutWechatReq ¶
type PutWechatReq struct {
Session string
}
type QuestionnaireController ¶
type QuestionnaireController struct { BaseController Server services.QuestionnaireService }
QuestionnaireController 问卷相关API
func (*QuestionnaireController) GetBy ¶
func (c *QuestionnaireController) GetBy(id string) int
GetBy 获取问卷信息
func (*QuestionnaireController) GetByAnswers ¶
func (c *QuestionnaireController) GetByAnswers(id string) int
GetByAnswers 获取问卷答案数据
func (*QuestionnaireController) GetByQuestions ¶
func (c *QuestionnaireController) GetByQuestions(id string) int
GetByQuestions 获取问卷问题
func (*QuestionnaireController) PostBy ¶
func (c *QuestionnaireController) PostBy(id string) int
PostBy 新建问卷
func (*QuestionnaireController) PostByAnswers ¶
func (c *QuestionnaireController) PostByAnswers(id string) int
PostByAnswers 添加新回答
func (*QuestionnaireController) PostByQuestions ¶
func (c *QuestionnaireController) PostByQuestions(id string) int
PostByQuestions 修改问卷问题
func (*QuestionnaireController) PutBy ¶
func (c *QuestionnaireController) PutBy(id string) int
PutBy 修改问卷信息
type QuestionsRes ¶
type QuestionsRes struct {
Data []models.ProblemSchema `json:"problems"`
}
QuestionsRes 问题请求
type SessionController ¶
type SessionController struct { BaseController Service services.UserService }
SessionController 用户登陆状态控制
func (*SessionController) GetViolet ¶
func (c *SessionController) GetViolet() int
GetViolet 通过 Violet 登陆
func (*SessionController) GetWechat ¶
func (c *SessionController) GetWechat() int
GetWechat 获取微信登陆二维码
func (*SessionController) PostWechat ¶
func (c *SessionController) PostWechat() int
PostWechat 通过微信登陆
type TaskController ¶
type TaskController struct { BaseController Service services.TaskService }
TaskController 任务相关API
func (*TaskController) DeleteByCollect ¶
func (c *TaskController) DeleteByCollect(id string) int
DeleteByCollect 删除收藏
func (*TaskController) DeleteByLike ¶
func (c *TaskController) DeleteByLike(id string) int
DeleteByLike 取消点赞任务
func (*TaskController) GetByPlayer ¶
func (c *TaskController) GetByPlayer(id string) int
GetByPlayer 获取任务参与者
func (*TaskController) GetByPlayerBy ¶
func (c *TaskController) GetByPlayerBy(id, userIDString string) int
GetByPlayerBy 获取用户任务状态
func (*TaskController) GetByWechat ¶
func (c *TaskController) GetByWechat(id string) int
GetByWechat 生成活动微信小程序码
func (*TaskController) PostByCollect ¶
func (c *TaskController) PostByCollect(id string) int
PostByCollect 添加收藏
func (*TaskController) PostByLike ¶
func (c *TaskController) PostByLike(id string) int
PostByLike 点赞任务
func (*TaskController) PostByPlayer ¶
func (c *TaskController) PostByPlayer(id string) int
PostByPlayer 增加任务参与人员
func (*TaskController) PutByPlayerBy ¶
func (c *TaskController) PutByPlayerBy(id, userIDString string) int
PutByPlayerBy 修改任务参与者状态
type TaskStatusReq ¶
type TaskStatusReq struct { Status string `json:"status"` Note string `json:"note"` Degree int `json:"degree"` Remark string `json:"remark"` Score int `json:"score"` Feedback string `json:"feedback"` }
TaskStatusReq 任务参与状态请求
type TasksListRes ¶
type TasksListRes struct { Pagination PaginationRes Tasks []services.TaskDetail }
TasksListRes 任务列表数据
type TasksStatusListRes ¶
type TasksStatusListRes struct { Pagination PaginationRes Data []services.TaskStatusDetail }
TasksStatusListRes 用户参与任务数据
type UserController ¶
type UserController struct { BaseController Service services.UserService }
UserController 用户控制
func (*UserController) DeleteFollowingBy ¶
func (c *UserController) DeleteFollowingBy(id string) int
DeleteFollowingBy 取消关注
func (*UserController) DeleteHistory ¶
func (c *UserController) DeleteHistory() int
DeleteHistory 清空用户搜索历史
func (*UserController) GetCollectBy ¶
func (c *UserController) GetCollectBy(userIDString string) int
GetCollectBy 获取用户收藏
func (*UserController) GetFollowerBy ¶
func (c *UserController) GetFollowerBy(id string) int
GetFollowerBy 获取用户粉丝列表
func (*UserController) GetFollowingBy ¶
func (c *UserController) GetFollowingBy(id string) int
GetFollowingBy 获取用户关注者列表
func (*UserController) GetInfoBy ¶
func (c *UserController) GetInfoBy(userID string) int
GetInfoBy 获取用户信息
func (*UserController) GetTaskBy ¶
func (c *UserController) GetTaskBy(userIDString string) int
GetTaskBy 获取用户参与的任务列表
func (*UserController) PostFollowingBy ¶
func (c *UserController) PostFollowingBy(id string) int
PostFollowingBy 添加关注
func (*UserController) PostPay ¶
func (c *UserController) PostPay() int
func (*UserController) PutTypeByID ¶
func (c *UserController) PutTypeByID(userID string) int
PutTypeByID 修改用户类型
type UserListRes ¶
type UserListRes struct { Pagination PaginationRes Data []services.UserDetail }
UserListRes 用户数据
type UtilsController ¶
type UtilsController struct { BaseController Service services.UtilsService }
TaskController 任务相关API
func (*UtilsController) GetLogs ¶
func (c *UtilsController) GetLogs() int