fix: lint errors
This commit was merged in pull request #130.
This commit is contained in:
@@ -17,7 +17,15 @@ type User struct {
|
||||
CreateAt time.Time
|
||||
}
|
||||
|
||||
func NewUser(id uuid.UUID, email string, emailVerified bool, emailVerifiedAt *time.Time, isAdmin bool, password []byte, salt []byte, createAt time.Time) *User {
|
||||
func NewUser(
|
||||
id uuid.UUID,
|
||||
email string,
|
||||
emailVerified bool,
|
||||
emailVerifiedAt *time.Time,
|
||||
isAdmin bool,
|
||||
password []byte,
|
||||
salt []byte,
|
||||
createAt time.Time) *User {
|
||||
return &User{
|
||||
Id: id,
|
||||
Email: email,
|
||||
@@ -31,10 +39,10 @@ func NewUser(id uuid.UUID, email string, emailVerified bool, emailVerifiedAt *ti
|
||||
}
|
||||
|
||||
type Session struct {
|
||||
Id string
|
||||
UserId uuid.UUID
|
||||
CreatedAt time.Time
|
||||
ExpiresAt time.Time
|
||||
Id string `db:"session_id"`
|
||||
UserId uuid.UUID `db:"user_id"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
ExpiresAt time.Time `db:"expires_at"`
|
||||
}
|
||||
|
||||
func NewSession(id string, userId uuid.UUID, createdAt time.Time, expiresAt time.Time) *Session {
|
||||
@@ -63,7 +71,13 @@ var (
|
||||
TokenTypeCsrf TokenType = "csrf"
|
||||
)
|
||||
|
||||
func NewToken(userId uuid.UUID, sessionId string, token string, tokenType TokenType, createdAt time.Time, expiresAt time.Time) *Token {
|
||||
func NewToken(
|
||||
userId uuid.UUID,
|
||||
sessionId string,
|
||||
token string,
|
||||
tokenType TokenType,
|
||||
createdAt time.Time,
|
||||
expiresAt time.Time) *Token {
|
||||
return &Token{
|
||||
UserId: userId,
|
||||
SessionId: sessionId,
|
||||
|
||||
Reference in New Issue
Block a user