Documentation ¶
Index ¶
- func Init(api *operations.TutorAPI, db *ent.Client)
- type Service
- func (s *Service) CreateEvent(ctx context.Context, event *ent.Event) (*ent.Event, error)
- func (s *Service) DeleteEventByID(ctx context.Context, id uuid.UUID) error
- func (s *Service) ListEvent(ctx context.Context, start, end *string) ([]*ent.Event, error)
- func (s *Service) ListEventUsersByID(ctx context.Context, id uuid.UUID) ([]*ent.User, error)
- func (s *Service) ListEventWithUsers(ctx context.Context, start, end *string) ([]*ent.Event, error)
- func (s *Service) ReadEventByID(ctx context.Context, id uuid.UUID) (*ent.Event, error)
- func (s *Service) ReadEventTypeByID(ctx context.Context, id uuid.UUID) (*ent.EventType, error)
- func (s *Service) UpdateEventByID(ctx context.Context, id uuid.UUID, event *ent.Event) (*ent.Event, error)
- func (s *Service) UpdateEventTypeByID(ctx context.Context, eventID uuid.UUID, typeID uuid.UUID) (*ent.Event, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶
type Service struct {
Event *ent.EventClient
}
Service holds an ent event client.
func (*Service) CreateEvent ¶
CreateEvent returns a new created event or an error.
func (*Service) DeleteEventByID ¶
DeleteEventByID returns an error.
func (*Service) ListEventUsersByID ¶
ListEventUsersByID returns a list of subscribed users to an event or an error.
func (*Service) ListEventWithUsers ¶
ListEventWithUsers returns an event list with category and users, or an error.
func (*Service) ReadEventByID ¶
ReadEventByID returns an event or an error.
func (*Service) ReadEventTypeByID ¶
ReadEventTypeByID returns the type of an event or an error.
Click to show internal directories.
Click to hide internal directories.