Documentation ¶
Index ¶
- type DBRepository
- func (r *DBRepository) Destroy(ctx context.Context, roleID uuid.UUID) error
- func (r *DBRepository) Index(ctx context.Context) (*[]Role, error)
- func (r *DBRepository) Show(ctx context.Context, roleID uuid.UUID) (*Role, error)
- func (r *DBRepository) Store(ctx context.Context, role *Role) error
- func (r *DBRepository) Update(ctx context.Context, roleID uuid.UUID, role *Role) error
- type Role
- type RoleController
- func (h *RoleController) CreateRoleController(c *fiber.Ctx) error
- func (h *RoleController) DeleteRoleController(c *fiber.Ctx) error
- func (h *RoleController) GetRoleController(c *fiber.Ctx) error
- func (h *RoleController) GetRolesController(c *fiber.Ctx) error
- func (h *RoleController) UpdateRoleController(c *fiber.Ctx) error
- type RoleRepository
- type RoleUseCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBRepository ¶
type DBRepository struct {
// contains filtered or unexported fields
}
type Role ¶
type Role struct { ID uuid.UUID `gorm:"type:uuid" json:"id"` Privilege string `gorm:"type:string" json:"privilege"` Description string `gorm:"type:string" json:"description"` CreatedAt time.Time `gorm:"autoUpdateTime" json:"created_at"` UpdatedAt time.Time `gorm:"autoCreateTime" json:"updated_at"` }
func (Role) CreateRoleValidation ¶
type RoleController ¶
type RoleController struct {
RoleUseCase RoleUseCase
}
func (*RoleController) CreateRoleController ¶
func (h *RoleController) CreateRoleController(c *fiber.Ctx) error
func (*RoleController) DeleteRoleController ¶
func (h *RoleController) DeleteRoleController(c *fiber.Ctx) error
func (*RoleController) GetRoleController ¶
func (h *RoleController) GetRoleController(c *fiber.Ctx) error
func (*RoleController) GetRolesController ¶
func (h *RoleController) GetRolesController(c *fiber.Ctx) error
func (*RoleController) UpdateRoleController ¶
func (h *RoleController) UpdateRoleController(c *fiber.Ctx) error
type RoleRepository ¶
type RoleRepository interface { Store(ctx context.Context, role *Role) error Update(ctx context.Context, roleID uuid.UUID, role *Role) error Destroy(ctx context.Context, roleID uuid.UUID) error Index(ctx context.Context) (*[]Role, error) Show(ctx context.Context, roleID uuid.UUID) (*Role, error) }
func NewRoleRepository ¶
func NewRoleRepository(dbConn *gorm.DB) RoleRepository
type RoleUseCase ¶
type RoleUseCase interface { GetRoles(ctx context.Context) (*[]Role, error) GetRole(ctx context.Context, roleID uuid.UUID) (*Role, error) DeleteRole(ctx context.Context, roleID uuid.UUID) error UpdateRole(ctx context.Context, roleID uuid.UUID, role *Role) error CreateRole(ctx context.Context, role *Role) error }
func NewRoleUseCase ¶
func NewRoleUseCase(r RoleRepository) RoleUseCase
Click to show internal directories.
Click to hide internal directories.