Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { ID uuid.UUID `json:"id" db:"id" example:"00000000-0000-0000-0000-000000000000"` AuthorID uuid.UUID `json:"author_id" db:"author_id" validate:"required" example:"00000000-0000-0000-0000-000000000000"` Title string `json:"title" db:"title" validate:"required,min=5,max=250" example:"Title"` Desc string `json:"desc" db:"desc" validate:"required" example:"Description"` UpdatedAt time.Time `json:"updated_at" db:"updated_at" example:"0000-01-01T00:00:00.000000Z"` CreatedAt time.Time `json:"created_at" db:"created_at" example:"0000-01-01T00:00:00.000000Z"` }
type ArticlesList ¶
type AuthUser ¶
type AuthUser struct { User *User `json:"user"` TokenType string `json:"token_type" validate:"required" example:"Bearer"` ExpiresIn int `json:"expires_in" validate:"required" example:"300"` AccessToken string `json:"access_token" validate:"required"` RefreshToken string `json:"refresh_token" validate:"required"` }
type User ¶
type User struct { ID uuid.UUID `json:"id" db:"id" example:"00000000-0000-0000-0000-000000000000"` Email string `json:"email" db:"email" validate:"required,email" example:"test@test.test"` Password string `json:"password,omitempty" db:"password" validate:"omitempty,min=6,max=250" swaggerignore:"true"` UpdatedAt time.Time `json:"updated_at" db:"updated_at" example:"0000-01-01T00:00:00.000000Z"` CreatedAt time.Time `json:"created_at" db:"created_at" example:"0000-01-01T00:00:00.000000Z"` }
func (*User) ComparePassword ¶
func (*User) HashPassword ¶
func (*User) SanitizePassword ¶
func (u *User) SanitizePassword()
func (*User) ValidatePassword ¶
Click to show internal directories.
Click to hide internal directories.