Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetUserResponse ¶
type UpdateUserResponse ¶
UpdateUserResponse is the response of a update user command.
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(logger *zap.SugaredLogger, userDB database.UserDB, statusDB database.OnlineStatusDB) *UserHandler
func (*UserHandler) DeleteUser ¶
func (h *UserHandler) DeleteUser(rw http.ResponseWriter, r *http.Request)
func (*UserHandler) GetUser ¶
func (h *UserHandler) GetUser(rw http.ResponseWriter, r *http.Request)
GetUser returns the authenticated user object swagger:route GET /api/user account getUser
return the authenticated user based on the api key Consumes: Produces: - application/json Schemes: http, https Security: api_key: Responses: default: ErrorResponse 401: ErrorResponse 404: ErrorResponse 500: ErrorResponse 200: UserResponse
func (*UserHandler) UpdateUser ¶
func (h *UserHandler) UpdateUser(rw http.ResponseWriter, r *http.Request)
func (*UserHandler) UserStatus ¶
func (h *UserHandler) UserStatus(rw http.ResponseWriter, r *http.Request)
type UserStatusResponse ¶
type UserStatusResponse struct { OnlineStatus *database.OnlineStatus `json:"online"` Banned byte `json:"banned"` Verified byte `json:"verified"` }
Click to show internal directories.
Click to hide internal directories.