diff options
Diffstat (limited to 'nexus/types')
| -rw-r--r-- | nexus/types/account/response.go | 15 | ||||
| -rw-r--r-- | nexus/types/auth/request.go | 16 | ||||
| -rw-r--r-- | nexus/types/auth/response.go | 6 | ||||
| -rw-r--r-- | nexus/types/character/context.go | 5 | ||||
| -rw-r--r-- | nexus/types/character/request.go | 10 | ||||
| -rw-r--r-- | nexus/types/character/response.go | 16 | ||||
| -rw-r--r-- | nexus/types/realm/response.go | 10 |
7 files changed, 78 insertions, 0 deletions
diff --git a/nexus/types/account/response.go b/nexus/types/account/response.go new file mode 100644 index 0000000..bb413ed --- /dev/null +++ b/nexus/types/account/response.go @@ -0,0 +1,15 @@ +package account
+
+import (
+ "time"
+
+ "github.com/google/uuid"
+)
+
+type Response struct {
+ ID uuid.UUID `json:"id"`
+ Username string `json:"username"`
+ Email string `json:"email"`
+ IsVerified bool `json:"is_verified"`
+ CreatedAt time.Time `json:"created_at"`
+}
diff --git a/nexus/types/auth/request.go b/nexus/types/auth/request.go new file mode 100644 index 0000000..ce821cc --- /dev/null +++ b/nexus/types/auth/request.go @@ -0,0 +1,16 @@ +package auth
+
+type RegisterRequest struct {
+ Username string `json:"username"`
+ Email string `json:"email"`
+ Password string `json:"password"`
+}
+
+type LoginRequest struct {
+ Email string `json:"email"`
+ Password string `json:"password"`
+}
+
+type RefreshRequest struct {
+ RefreshToken string `json:"refresh_token"`
+}
diff --git a/nexus/types/auth/response.go b/nexus/types/auth/response.go new file mode 100644 index 0000000..718fb97 --- /dev/null +++ b/nexus/types/auth/response.go @@ -0,0 +1,6 @@ +package auth
+
+type TokenResponse struct {
+ AuthToken string `json:"auth_token"`
+ RefreshToken string `json:"refresh_token"`
+}
diff --git a/nexus/types/character/context.go b/nexus/types/character/context.go new file mode 100644 index 0000000..ac05332 --- /dev/null +++ b/nexus/types/character/context.go @@ -0,0 +1,5 @@ +package character
+
+type IndexContext struct {
+ Characters []Response
+}
diff --git a/nexus/types/character/request.go b/nexus/types/character/request.go new file mode 100644 index 0000000..1c62190 --- /dev/null +++ b/nexus/types/character/request.go @@ -0,0 +1,10 @@ +package character
+
+import "github.com/google/uuid"
+
+type CreateRequest struct {
+ Name string `json:"name"`
+ Race string `json:"race"`
+ StartingKingdom string `json:"starting_kingdom"`
+ RealmID uuid.UUID `json:"realm_id"`
+}
diff --git a/nexus/types/character/response.go b/nexus/types/character/response.go new file mode 100644 index 0000000..5806cb7 --- /dev/null +++ b/nexus/types/character/response.go @@ -0,0 +1,16 @@ +package character
+
+import (
+ "time"
+
+ "github.com/google/uuid"
+)
+
+type Response struct {
+ ID uuid.UUID `json:"id"`
+ Name string `json:"name"`
+ Race string `json:"race"`
+ StartingKingdom string `json:"starting_kingdom"`
+ RealmID uuid.UUID `json:"realm_id"`
+ CreatedAt time.Time `json:"created_at"`
+}
diff --git a/nexus/types/realm/response.go b/nexus/types/realm/response.go new file mode 100644 index 0000000..e477bda --- /dev/null +++ b/nexus/types/realm/response.go @@ -0,0 +1,10 @@ +package realm
+
+import "github.com/google/uuid"
+
+type Response struct {
+ ID uuid.UUID `json:"id"`
+ Name string `json:"name"`
+ Region string `json:"region"`
+ IsOnline bool `json:"is_online"`
+}
|
