Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateParticipantReq ¶
type CreateParticipantReq struct { Name string `json:"name"` Email string `json:"email"` Rsvp string `json:"rsvp"` }
CreateParticipantReq represents the structure for creating a participant
type Repository ¶
type Repository interface { CreateParticipant(CreateParticipantReq) error GetAllMeetings(email string, page int) ([]int, error) }
Repository acts as the defining layer between service(usecase and implementation)
func MakeNewParticipantRepo ¶
func MakeNewParticipantRepo(client *mongo.Client) Repository
MakeNewParticipantRepo takes and instance of mongo client and initializes the repo
type Service ¶
type Service interface { CreateParticipant(CreateParticipantReq) error GetAllMeetings(email string, page int) ([]int, error) }
Service acts as the usecase layer of clean architecture
func MakeNewParticipantService ¶
func MakeNewParticipantService(repo Repository) Service
MakeNewParticipantService provides a new instance of participant service
Click to show internal directories.
Click to hide internal directories.