meeting

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 CreateMeetingReq

type CreateMeetingReq struct {
	Title        string                 `json:"title"`
	StartTime    string                 `json:"starttime"`
	EndTime      string                 `json:"endtime"`
	Participants []entities.Participant `json:"participants"`
}

CreateMeetingReq represents the structure for creating a meeting

type Repository

type Repository interface {
	CreateMeeting(CreateMeetingReq) error
	GetMeetingDetailsFromId(uid int) (entities.Meeting, error)
	GetMeetingDetailsFromTime(start, end string) ([]entities.Meeting, error)
}

Repository acts as the defining layer between service(usecase and implementation)

func MakeNewMeetingRepo

func MakeNewMeetingRepo(client *mongo.Client) Repository

MakeNewMeetingRepo takes and instance of mongo client and initializes the repo

type Service

type Service interface {
	CreateMeeting(CreateMeetingReq) error
	GetMeetingDetailsFromId(uid int) (entities.Meeting, error)
	GetMeetingDetailsFromTime(start, end string) ([]entities.Meeting, error)
}

Service acts as the usecase layer of clean architecture

func MakeNewMeetingService

func MakeNewMeetingService(repo Repository) Service

MakeNewMeetingService provides a new instance of meeting service

Jump to

Keyboard shortcuts

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