Versions in this module Expand all Collapse all v0 v0.0.2 Oct 19, 2024 Changes in this version type Auth + func (s *Auth) ToMap() *map[string]any v0.0.1 Oct 7, 2024 Changes in this version + const AuthTableName + const DepartmentTableName + const ProfileTableName + const UserTableName + type Auth struct + Password *string + Profile *Profile + ProfileID uint + Status bool + Token *string + func (s *Auth) TableName() string + type AuthService interface + Login func(context.Context, *dto.AuthInputDTO, string) (*dto.AuthOutputDTO, error) + Me func(*User) *dto.UserOutputDTO + Refresh func(*User, string) *dto.AuthOutputDTO + type Base struct + CreatedAt time.Time + ID uint + UpdatedAt time.Time + type Department struct + Name string + func (s *Department) Bind(p *dto.DepartmentInputDTO) error + func (s *Department) TableName() string + func (s *Department) ToMap() map[string]any + type DepartmentRepository interface + CountDepartments func(context.Context, *filter.Filter) (int64, error) + CreateDepartment func(context.Context, *dto.DepartmentInputDTO) (*Department, error) + DeleteDepartments func(context.Context, []uint) error + GetDepartmentByID func(context.Context, uint) (*Department, error) + GetDepartments func(context.Context, *filter.Filter) (*[]Department, error) + UpdateDepartment func(context.Context, *Department, *dto.DepartmentInputDTO) error + type DepartmentService interface + CreateDepartment func(context.Context, *dto.DepartmentInputDTO) (*dto.DepartmentOutputDTO, error) + DeleteDepartments func(context.Context, []uint) error + GenerateDepartmentOutputDTO func(*Department) *dto.DepartmentOutputDTO + GetDepartmentByID func(context.Context, uint) (*dto.DepartmentOutputDTO, error) + GetDepartments func(context.Context, *filter.Filter) (*dto.ItemsOutputDTO[dto.DepartmentOutputDTO], error) + UpdateDepartment func(context.Context, uint, *dto.DepartmentInputDTO) (*dto.DepartmentOutputDTO, error) + type File struct + Extension string + File io.Reader + Name string + type Profile struct + Name string + Permissions pgutils.JSONB + func (s *Profile) Bind(p *dto.ProfileInputDTO) error + func (s *Profile) TableName() string + func (s *Profile) ToMap() *map[string]any + type ProfileRepository interface + CountProfiles func(context.Context, *filter.Filter) (int64, error) + CreateProfile func(context.Context, *dto.ProfileInputDTO) (*Profile, error) + DeleteProfiles func(context.Context, []uint) error + GetProfileByID func(context.Context, uint) (*Profile, error) + GetProfiles func(context.Context, *filter.Filter) (*[]Profile, error) + UpdateProfile func(context.Context, *Profile, *dto.ProfileInputDTO) error + type ProfileService interface + CreateProfile func(context.Context, *dto.ProfileInputDTO) (*dto.ProfileOutputDTO, error) + DeleteProfiles func(context.Context, []uint) error + GenerateProfileOutputDTO func(*Profile) *dto.ProfileOutputDTO + GetProfileByID func(context.Context, uint) (*dto.ProfileOutputDTO, error) + GetProfiles func(context.Context, *filter.Filter) (*dto.ItemsOutputDTO[dto.ProfileOutputDTO], error) + UpdateProfile func(context.Context, uint, *dto.ProfileInputDTO) (*dto.ProfileOutputDTO, error) + type User struct + Auth *Auth + AuthID uint + Email string + Name string + PhotoPath *string + func (u *User) Bind(userDTO *dto.UserInputDTO) error + func (u *User) GenerateToken(expire, originalKey, ip string) (string, error) + func (u *User) TableName() string + func (u *User) ToMap() *map[string]any + func (u *User) ValidatePassword(password string) bool + type UserRepository interface + CountUsers func(context.Context, *filters.UserFilter) (int64, error) + CreateUser func(context.Context, *dto.UserInputDTO) (*User, error) + DeleteUsers func(context.Context, []uint) error + GenerateUserPhotoURL func(context.Context, *User) (string, error) + GetUserByID func(context.Context, uint) (*User, error) + GetUserByMail func(context.Context, string) (*User, error) + GetUserByToken func(context.Context, string) (*User, error) + GetUsers func(context.Context, *filters.UserFilter) (*[]User, error) + ResetUserPassword func(context.Context, *User) error + SetUserPassword func(context.Context, *User, *dto.PasswordInputDTO) error + SetUserPhoto func(context.Context, *User, *File) error + UpdateUser func(context.Context, *User, *dto.UserInputDTO) error + type UserService interface + CreateUser func(context.Context, *dto.UserInputDTO) (*dto.UserOutputDTO, error) + DeleteUsers func(context.Context, []uint) error + GenerateUserOutputDTO func(*User) *dto.UserOutputDTO + GenerateUserPhotoURL func(context.Context, uint) (string, error) + GetUserByID func(context.Context, uint) (*dto.UserOutputDTO, error) + GetUsers func(context.Context, *filters.UserFilter) (*dto.ItemsOutputDTO[dto.UserOutputDTO], error) + ResetUserPassword func(context.Context, string) error + SetUserPassword func(context.Context, string, *dto.PasswordInputDTO) error + SetUserPhoto func(context.Context, uint, *File) error + UpdateUser func(context.Context, uint, *dto.UserInputDTO) (*dto.UserOutputDTO, error)