participant

package
v0.0.0-...-3cb4649 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2021 License: MIT Imports: 7 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL