Documentation ¶
Index ¶
Constants ¶
View Source
const ( ADMIN_ROLE = "admin" USER_ROLE = "user" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Id uuid.UUID `db:"id"` UserId uuid.UUID `db:"user_id"` RoomId uuid.UUID `db:"room_id"` Text string `db:"text"` CreatedAt time.Time `db:"created_at"` }
func (*Message) ToPbMessage ¶
type RefreshToken ¶
type Room ¶
type TokenPair ¶
type TokenPair struct { JwtToken string RefreshToken *RefreshToken }
type User ¶
type User struct { Id uuid.UUID `db:"id"` Username string `db:"username"` PasswordHash string `db:"password_hash"` Role string `db:"role"` }
func (*User) IsCorrectPassword ¶
type UserClaims ¶
type UserClaims struct { jwt.StandardClaims Username string `json:"username"` Role string `json:"role"` }
Click to show internal directories.
Click to hide internal directories.