Documentation ¶
Index ¶
- func Create(c *gin.Context)
- func Delete(c *gin.Context)
- func Get(c *gin.Context)
- func GetList(c *gin.Context)
- func GetMe(c *gin.Context)
- func Import(c *gin.Context)
- func ImportStatus(c *gin.Context)
- func ListByApplication(c *gin.Context)
- func ListNotInApplication(c *gin.Context)
- func Login(c *gin.Context)
- func RefreshToken(c *gin.Context)
- func Register(c *gin.Context)
- func Update(c *gin.Context)
- type CreateRequest
- type CreateResponse
- type CreateUserRequest
- type ImportTaskStatus
- type ItemStatus
- type ListResponse
- type LoginCredentials
- type RegisterRequest
- type SwaggerListResponse
- type UpdateRequest
- type UpdateUserRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Register Add developer @Summary Add developer @Description Admin add developer @Tags Users @Produce json @param Authorization header string true "Authorization" @Param register body user.CreateUserRequest true "Reg user info" @Success 200 {object} model.UserInfo @Router /v1/users [post]
func Delete ¶
Create Delete users @Summary Delete users @Description Delete users @Tags Users @Accept json @Produce json @param Authorization header string true "Authorization" @Param id path uint64 true "User ID" @Success 200 {object} api.Response "{"code":0,"message":"OK","data":null}" @Router /v1/users/{id} [delete]
func Get ¶
Get Get user details @Summary Get user details @Description Get user details @Tags Users @Accept json @Produce json @Param id path string true "Users ID" @param Authorization header string true "Authorization" @Success 200 {object} model.UserInfo "Userinfo" @Router /v1/users/{id} [get]
func GetList ¶
Get Get user list @Summary Get user list @Description Get userlist @Tags Users @Accept json @Produce json @param Authorization header string true "Authorization" @Success 200 {object} model.UserList "Get user list" @Router /v1/users [get]
func GetMe ¶
Get Get user personal information @Summary Get user personal information @Description Get user personal information @Tags Users @Accept json @Produce json @param Authorization header string true "Authorization" @Success 200 {object} model.UserInfo "Userinfo" @Router /v1/me [get]
func ImportStatus ¶
func ListByApplication ¶
List all authorized user in application
func ListNotInApplication ¶
List all unauthorized user in application
func Login ¶
Login Web and plug-in login @Summary Web and plug-in login @Description Web and plug-in login @Tags Users @Produce json @Param login body user.LoginCredentials true "Login user info" @Success 200 {string} json "{"code":0,"message":"OK","data":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"}}" @Router /v1/login [post]
func RefreshToken ¶
func Register ¶
Register Registration(obsolete) @Summary The administrator adds users, users cannot register themselves @Description Registration(obsolete) @Tags Users @Produce json @Param register body user.RegisterRequest true "Reg user info" @Success 200 {string} json "{"code":0,"message":"OK","data":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"}}" @Router /v1/register [post]
func Update ¶
Update Update user information @Summary Update user information (including disabled users) @Description Update a user by ID,Only status is required @Tags Users @Accept json @Produce json @param Authorization header string true "Authorization" @Param id path uint64 true "The user's database id index num" @Param user body user.UpdateUserRequest true "Update user info" @Success 200 {object} model.UserBaseModel @Router /v1/users/{id} [put]
Types ¶
type CreateRequest ¶
CreateRequest
type CreateResponse ¶
type CreateResponse struct {
Username string `json:"username"`
}
CreateResponse
type CreateUserRequest ¶
type CreateUserRequest struct { Email string `json:"email" form:"email" binding:"required"` Name string `json:"name" form:"name" binding:"required"` Password string `json:"password" form:"password" binding:"required"` ConfirmPassword string `json:"confirm_password" form:"confirm_password" binding:"required"` Status *uint64 `json:"status" form:"status" binding:"required"` IsAdmin *uint64 `json:"is_admin" form:"is_admin" binding:"required"` }
CreateUserRequest
type ImportTaskStatus ¶
type ImportTaskStatus struct { Process float32 // 0.0 ~ 1.0 Items []ItemStatus ErrInfo string }
type ItemStatus ¶
type ListResponse ¶
type ListResponse struct { TotalCount uint64 `json:"total_count"` HasMore int `json:"has_more"` PageKey string `json:"page_key"` PageValue int `json:"page_value"` Items interface{} `json:"items"` }
ListResponse
type LoginCredentials ¶
type LoginCredentials struct { Email string `json:"email" form:"email" binding:"required"` Password string `json:"password" form:"password" binding:"required"` From string `json:"from" form:"from" example:"only use for plugin, web interface do not send this key"` }
LoginCredentials
type RegisterRequest ¶
type RegisterRequest struct { Email string `json:"email" form:"email"` Password string `json:"password" form:"password"` ConfirmPassword string `json:"confirm_password" form:"confirm_password"` }
RegisterRequest
type SwaggerListResponse ¶
type SwaggerListResponse struct { TotalCount uint64 `json:"totalCount"` UserList []model.UserInfo `json:"userList"` }
SwaggerListResponse
type UpdateRequest ¶
UpdateRequest
type UpdateUserRequest ¶
type UpdateUserRequest struct { Email string `json:"email" form:"email"` Name string `json:"name" form:"name"` Password string `json:"password" form:"password"` Status *uint64 `json:"status" form:"status"` IsAdmin *uint64 `json:"is_admin" form:"is_admin"` }
UpdateUserRequest