Documentation ¶
Index ¶
- Variables
- func AuthDataValidator(authType string, userSignupData UserSignupData) []map[string]string
- func CheckIfStringInSlice(s []string, str string) bool
- func CreateUUID() string
- func DbInitializers()
- func GenerateJWT(userData *domain.User) (string, error)
- func GenerateRandomNumber(n int) int
- func GetAuthToken(r *http.Request, routeType string) string
- func GetClientIP(r *http.Request) (string, error)
- func GetUserIDsInChatMessage(chat, prefix string) []string
- func HashPassword(password string) (string, error)
- func LoadEnvVars()
- func PasswordMatches(hashedPassword, password string) bool
- func RemoveUsersIDFromMessage(str string) string
- func ServerChat() string
- type AuthData
- type ErrorResponse
- type Message
- type Response
- type UserSignupData
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Database *gorm.DB
)
Functions ¶
func AuthDataValidator ¶
func AuthDataValidator(authType string, userSignupData UserSignupData) []map[string]string
func CheckIfStringInSlice ¶
func CreateUUID ¶
func CreateUUID() string
func DbInitializers ¶
func DbInitializers()
func GenerateRandomNumber ¶
func GetUserIDsInChatMessage ¶
func HashPassword ¶
func LoadEnvVars ¶
func LoadEnvVars()
func PasswordMatches ¶
func ServerChat ¶
func ServerChat() string
Types ¶
type ErrorResponse ¶
type Message ¶
type Message struct { MsgType string `json:"msgType"` ClientID string `json:"clientID"` ClientCount int `json:"clientCount"` ClientsList map[string]string `json:"clientsList"` Action string `json:"action"` Message string `json:"message"` Sender string `json:"sender"` Private bool `json:"private"` To []string `json:"to"` Mentioned bool `json:"mentioned"` Date time.Time `json:"date"` }
type UserSignupData ¶
Click to show internal directories.
Click to hide internal directories.