Documentation ¶
Index ¶
- type ActionType
- type AuthRequest
- type AuthResponse
- type Department
- type DepartmentRequest
- type DepartmentResponse
- type Employee
- type EmployeeRequest
- type EmployeeResponse
- type GenderType
- type GetAllDepartmentRequest
- type GetAllEmployeeRequest
- type PaginationRequest
- type UpdateEmployeeRequest
- type UpdateEmployeeResponse
- type User
- type UserPatchRequest
- type UserRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
const ( Create ActionType = "create" Login ActionType = "login" )
type AuthRequest ¶
func (*AuthRequest) ComparePassword ¶
func (d *AuthRequest) ComparePassword(password string) error
func (*AuthRequest) HashPassword ¶
func (d *AuthRequest) HashPassword() error
func (*AuthRequest) SetName ¶
func (d *AuthRequest) SetName()
func (*AuthRequest) ValidatePayloadAuth ¶
func (d *AuthRequest) ValidatePayloadAuth() error
type AuthResponse ¶
type Department ¶
type DepartmentRequest ¶
type DepartmentResponse ¶
type EmployeeRequest ¶
type EmployeeResponse ¶
type GenderType ¶
type GenderType string
type GetAllDepartmentRequest ¶
type GetAllDepartmentRequest struct { Name string `form:"name"` ManagerID int `form:"-"` PaginationRequest }
type GetAllEmployeeRequest ¶
type PaginationRequest ¶
func (*PaginationRequest) GetLimit ¶
func (p *PaginationRequest) GetLimit() int64
func (*PaginationRequest) GetOffset ¶
func (p *PaginationRequest) GetOffset() int64
type UpdateEmployeeRequest ¶
type UpdateEmployeeRequest struct { IdentityNumber string `json:"identityNumber" validate:"min=5,max=33"` Name string `json:"name" validate:"min=5,max=33"` EmployeeImageURI string `json:"employeeImageUri" validate:"url"` Gender GenderType `json:"gender" validate:"oneof=male female"` DepartmentID string `json:"departmentId" validate:"required"` ManagerID int `form:"-"` }
type UpdateEmployeeResponse ¶
type UserPatchRequest ¶
type UserPatchRequest struct { Email *string `json:"email" validate:"email"` Name *string `json:"name" validate:"min=4,max=52"` UserImageUri *string `json:"userImageUri" validate:"url"` CompanyName *string `json:"companyName" validate:"min=4,max=52"` CompanyImageUri *string `json:"companyImageUri" validate:"url"` }
func (*UserPatchRequest) Validate ¶
func (u *UserPatchRequest) Validate() error
type UserRequest ¶
type UserRequest struct {
UserID int `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.