Documentation ¶
Index ¶
- func Init(api *operations.TutorAPI, db *ent.Client)
- type Service
- func (r *Service) AddRole(ctx context.Context, user *user.Service, id uuid.UUID, name string) ([]*ent.Role, error)
- func (r *Service) ListRole(ctx context.Context) ([]*ent.Role, error)
- func (r *Service) ReadRoleByName(ctx context.Context, name string) (*ent.Role, error)
- func (r *Service) RemoveRole(ctx context.Context, user *user.Service, id uuid.UUID, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶
type Service struct {
Role *ent.RoleClient
}
Service holds an ent role client.
func (*Service) AddRole ¶
func (r *Service) AddRole(ctx context.Context, user *user.Service, id uuid.UUID, name string) ([]*ent.Role, error)
AddRole returns user roles or an error.
func (*Service) ReadRoleByName ¶
ReadRoleByName returns a role or an error.
Click to show internal directories.
Click to hide internal directories.