Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginRequestDto ¶
type LoginRequestDto struct { Username string `json:"username" validate:"required"` Password string `json:"password" validate:"required"` }
func (*LoginRequestDto) ValidateLoginRequestDto ¶
func (data *LoginRequestDto) ValidateLoginRequestDto() ([]*utils.ErrorResponse, bool)
type LoginResponseDto ¶
type LoginResponseDto struct { UserID uint `json:"userId"` Username string `json:"username"` Email string `json:"email"` Token string `json:"token"` IsSuperuser bool `json:"isSuperUser"` }
func ParseToLoginResponseDto ¶
func ParseToLoginResponseDto(token string, u *models.Users) *LoginResponseDto
type TokenClaimPayload ¶
type UserCreateDto ¶
type UserCreateDto struct { Username string `json:"username" validate:"required,min=4,max=50"` Email string `json:"email" validate:"required,email,min=8,max=100"` Password string `json:"password" validate:"required,min=6"` }
func (*UserCreateDto) ParseFromDto ¶
func (data *UserCreateDto) ParseFromDto() (user *models.Users)
func (*UserCreateDto) ValidateUserCreateDto ¶
func (data *UserCreateDto) ValidateUserCreateDto() ([]*utils.ErrorResponse, bool)
type UserResponseDto ¶
type UserResponseDto struct { Id uint `json:"id"` Username string `json:"username"` Email string `json:"email"` IsActive bool `json:"is_active"` IsSuperuser bool `json:"is_superuser"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func ParseUserToResponseDto ¶
func ParseUserToResponseDto(user *models.Users) *UserResponseDto
func ParseUsersListToResponseDto ¶
func ParseUsersListToResponseDto(users *[]models.Users) []UserResponseDto
func (*UserResponseDto) ParseToResponseDto ¶
func (udto *UserResponseDto) ParseToResponseDto(user *models.Users)
type UserUpdateDto ¶
type UserUpdateDto struct { Email string `json:"email" validate:"omitempty,email,min=8,max=100"` IsSuperuser *bool `json:"is_superuser" validate:"omitempty"` IsActive *bool `json:"is_active" validate:"omitempty"` }
func (*UserUpdateDto) ValidateUserUpdateDto ¶
func (data *UserUpdateDto) ValidateUserUpdateDto() ([]*utils.ErrorResponse, bool)
Click to show internal directories.
Click to hide internal directories.