Documentation ¶
Index ¶
- type RoleService
- type RoleServiceImpl
- func (svc *RoleServiceImpl) Create(ctx context.Context, data model.RoleCreate) (id int, err error)
- func (svc *RoleServiceImpl) Delete(ctx context.Context, id int) (err error)
- func (svc *RoleServiceImpl) GetAll(ctx context.Context, filter model.RequestGetAll) (roles []model.RoleResponse, total int, err error)
- func (svc *RoleServiceImpl) GetByID(ctx context.Context, id int) (role model.RoleResponse, err error)
- func (svc *RoleServiceImpl) Update(ctx context.Context, data model.RoleUpdate) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoleService ¶
type RoleService interface { // auth + admin Create(ctx context.Context, data model.RoleCreate) (id int, err error) GetByID(ctx context.Context, id int) (role model.RoleResponse, err error) GetAll(ctx context.Context, filter model.RequestGetAll) (roles []model.RoleResponse, total int, err error) Update(ctx context.Context, data model.RoleUpdate) (err error) Delete(ctx context.Context, id int) (err error) }
func NewRoleService ¶
func NewRoleService() RoleService
type RoleServiceImpl ¶
type RoleServiceImpl struct {
// contains filtered or unexported fields
}
func (*RoleServiceImpl) Create ¶
func (svc *RoleServiceImpl) Create(ctx context.Context, data model.RoleCreate) (id int, err error)
func (*RoleServiceImpl) Delete ¶
func (svc *RoleServiceImpl) Delete(ctx context.Context, id int) (err error)
func (*RoleServiceImpl) GetAll ¶
func (svc *RoleServiceImpl) GetAll(ctx context.Context, filter model.RequestGetAll) (roles []model.RoleResponse, total int, err error)
func (*RoleServiceImpl) GetByID ¶
func (svc *RoleServiceImpl) GetByID(ctx context.Context, id int) (role model.RoleResponse, err error)
func (*RoleServiceImpl) Update ¶
func (svc *RoleServiceImpl) Update(ctx context.Context, data model.RoleUpdate) (err error)
Click to show internal directories.
Click to hide internal directories.