summaryrefslogtreecommitdiff
path: root/nexus/types
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-03-29 22:52:46 +0530
committerBobby <[email protected]>2026-03-29 22:52:46 +0530
commit9eb9b7f4bd552a641235764f66483e1f940fcfd9 (patch)
treeda520b923b5e6758d5457b6233dd6671fc640914 /nexus/types
parent65a143a0871c35989b7c7ea6723d39a0585c089e (diff)
downloadechoes-of-vaelun-main.tar.xz
echoes-of-vaelun-main.zip
feat: nexus account manager scaffold with auth, characters, realmsHEADmain
Diffstat (limited to 'nexus/types')
-rw-r--r--nexus/types/account/response.go15
-rw-r--r--nexus/types/auth/request.go16
-rw-r--r--nexus/types/auth/response.go6
-rw-r--r--nexus/types/character/context.go5
-rw-r--r--nexus/types/character/request.go10
-rw-r--r--nexus/types/character/response.go16
-rw-r--r--nexus/types/realm/response.go10
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"`
+}