Browse Source

add auth stuff

reid 2 năm trước cách đây
mục cha
commit
1569dd0de5
1 tập tin đã thay đổi với 23 bổ sung0 xóa
  1. 23 0
      structs/ws.go

+ 23 - 0
structs/ws.go

@@ -0,0 +1,23 @@
+package structs
+
+type WsType struct {
+	Payload struct {
+		Type string `json:"type"`
+	} `json:"payload"`
+}
+
+type WsPayload struct {
+	ID      string      `json:"id"`
+	Payload interface{} `json:"payload"`
+	Token   TokenStruct `json:"token"`
+}
+
+type TokenStruct struct {
+	ID    string `json:"id"`
+	Token string `json:"token"`
+}
+
+type LoginPayload struct {
+	Type     string `json:"type"`
+	Password string `json:"password"`
+}