Documentation ¶
Index ¶
- func Init(api *operations.TutorAPI, db *ent.Client)
- type Service
- func (s *Service) CreateUser(ctx context.Context, user *ent.User) (*ent.User, error)
- func (s *Service) DeleteUserByID(ctx context.Context, id uuid.UUID) error
- func (s *Service) DeleteUserByLogin(ctx context.Context, login string) error
- func (s *Service) ListUser(ctx context.Context, tutor *bool) ([]*ent.User, error)
- func (s *Service) ListUserEventsByID(ctx context.Context, id uuid.UUID) ([]*ent.Event, error)
- func (s *Service) ListUserEventsByLogin(ctx context.Context, login string) ([]*ent.Event, error)
- func (s *Service) ListUserRolesByID(ctx context.Context, id uuid.UUID) ([]*ent.Role, error)
- func (s *Service) ListUserRolesByLogin(ctx context.Context, login string) ([]*ent.Role, error)
- func (s *Service) ReadUserByID(ctx context.Context, id uuid.UUID) (*ent.User, error)
- func (s *Service) ReadUserByLogin(ctx context.Context, login string) (*ent.User, error)
- func (s *Service) SetUserOnLogin(ctx context.Context, user *ent.User) (*ent.User, error)
- func (s *Service) SubscribeUserByID(ctx context.Context, userId uuid.UUID, eventId uuid.UUID) ([]*ent.Event, error)
- func (s *Service) SubscribeUserByLogin(ctx context.Context, login string, id uuid.UUID) ([]*ent.Event, error)
- func (s *Service) UnsubscribeUserByID(ctx context.Context, userId uuid.UUID, eventId uuid.UUID) error
- func (s *Service) UnsubscribeUserByLogin(ctx context.Context, login string, id uuid.UUID) error
- func (s *Service) UpdateUserByID(ctx context.Context, id uuid.UUID, user *ent.User) (*ent.User, error)
- func (s *Service) UpdateUserByLogin(ctx context.Context, login string, userInfo *ent.User) (*ent.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶
type Service struct {
User *ent.UserClient
}
Service holds an ent user client.
func (*Service) CreateUser ¶
CreateUser returns a new created user or an error.
func (*Service) DeleteUserByID ¶
DeleteUserByID returns an error.
func (*Service) DeleteUserByLogin ¶
DeleteUserByLogin returns an error.
func (*Service) ListUserEventsByID ¶
ListUserEventsByID returns an event list of a user or an error.
func (*Service) ListUserEventsByLogin ¶
ListUserEventsByLogin returns an event list of a user or an error.
func (*Service) ListUserRolesByID ¶
ListUserRolesByID returns a role list of a user or an error.
func (*Service) ListUserRolesByLogin ¶
ListUserRolesByLogin returns a role list of a user or an error.
func (*Service) ReadUserByID ¶
ReadUserByID returns a user or an error.
func (*Service) ReadUserByLogin ¶
ReadUserByLogin returns a user or an error.
func (*Service) SetUserOnLogin ¶
SetUserOnLogin returns a new or an updated user.
func (*Service) SubscribeUserByID ¶
func (s *Service) SubscribeUserByID(ctx context.Context, userId uuid.UUID, eventId uuid.UUID) ([]*ent.Event, error)
SubscribeUserByID returns an event list of a user or an error.
func (*Service) SubscribeUserByLogin ¶
func (s *Service) SubscribeUserByLogin(ctx context.Context, login string, id uuid.UUID) ([]*ent.Event, error)
SubscribeUserByLogin returns an event list of a user or an error.
func (*Service) UnsubscribeUserByID ¶
func (s *Service) UnsubscribeUserByID(ctx context.Context, userId uuid.UUID, eventId uuid.UUID) error
UnsubscribeUserByID returns an error.
func (*Service) UnsubscribeUserByLogin ¶
UnsubscribeUserByLogin returns an error.