This repository has been archived by the owner on Jul 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
request_models.go
52 lines (42 loc) · 1.57 KB
/
request_models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package main
import "github.com/gofiber/fiber/v2"
var ErrInvalidRequestBody = fiber.Map{"error": "Invalid request body."}
var ErrInternalServerError = fiber.Map{"error": "Internal server error."}
type AuthenticationRequest struct {
UserId string `json:"user_id"`
DisplayName string `json:"display_name"`
Password string `json:"password"`
PersistentToken string `json:"persistent_token"`
NeedPersistentToken bool `json:"need_persistent_token"`
}
type AuthenticationResponse struct {
Token string `json:"token"`
PersistentToken string `json:"persistent_token"`
}
type PasswordResetRequest struct {
UserId string `json:"user_id"`
Password string `json:"password"`
NewPassword string `json:"new_password"`
}
type AvatarFavoriteRequest struct {
AvatarId string `json:"avatar_id"`
AvatarName string `json:"avatar_name"`
AvatarAuthorId string `json:"avatar_author_id"`
AvatarAuthorName string `json:"avatar_author_name"`
AvatarAssetUrl string `json:"avatar_asset_url"`
AvatarThumbnailUrl string `json:"avatar_thumbnail_url"`
AvatarPublic bool `json:"avatar_public"`
AvatarSupportedPlatforms int `json:"avatar_supported_platforms"`
}
type AvatarExportResponse struct {
AvatarId string `json:"avatar_id"`
AvatarName string `json:"avatar_name"`
}
// Admin Request Models
type GenericUserRequest struct {
UserId string `json:"user_id"`
}
type TransferRequest struct {
UserId string `json:"user_id"`
TargetUserId string `json:"target_user_id"`
}