Documentation ¶
Index ¶
- func WithActivityRepository(ar ActivityRepository) serviceConfiguration
- func WithLogger(l log.Logger) serviceConfiguration
- type Activity
- type ActivityRepository
- type Service
- func (s *Service) Activities(_ context.Context) ([]Activity, error)
- func (s *Service) Activity(_ context.Context, id uuid.UUID) (Activity, error)
- func (s *Service) CreateActivity(_ context.Context, activity *Activity) error
- func (s *Service) DeleteActivity(_ context.Context, id uuid.UUID) error
- func (s *Service) UpdateActivity(_ context.Context, activity *Activity) error
- type ServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithActivityRepository ¶
func WithActivityRepository(ar ActivityRepository) serviceConfiguration
WithActivityRepository injects the course repository to the domain Service
func WithLogger ¶
WithLogger injects the logger to the domain Service
Types ¶
type Activity ¶
type Activity struct { ID uint `json:"id"` UUID uuid.UUID `json:"uuid"` Name string `json:"name"` Description string `json:"description"` ContentID uuid.UUID `json:"content_id"` ContentType string `json:"content_type"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *time.Time `json:"deleted_at"` }
type ActivityRepository ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
NewService creates a new domain Service instance
func (*Service) CreateActivity ¶
func (*Service) DeleteActivity ¶
type ServiceInterface ¶
type ServiceInterface interface { Activity(ctx context.Context, id uuid.UUID) (Activity, error) Activities(ctx context.Context) ([]Activity, error) CreateActivity(ctx context.Context, activity *Activity) error UpdateActivity(ctx context.Context, activity *Activity) error DeleteActivity(ctx context.Context, id uuid.UUID) error }
ServiceInterface defines the domains Service interface
Click to show internal directories.
Click to hide internal directories.