services

package
v0.0.0-...-cfff90c Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTaskDueStatus

func CheckTaskDueStatus()

----------------> CheckTaskDueStatus------------>

func CreateToken

func CreateToken(email, customerid string) (string, error)

func ExtractCustomerID

func ExtractCustomerID(jwtToken string, secretKey string) (string, error)

func GenerateUniqueCustomerID

func GenerateUniqueCustomerID() string

func GetRandomString

func GetRandomString(length int) string

Custom function to generate random characters (for demonstration purposes)

func InitCustomerService

func InitCustomerService(collection1, collection2, collection3 *mongo.Collection, ctx context.Context) interfaces.Customer

func IsValidUser

func IsValidUser(user *models.Login) (bool, models.Customer)

func RunTaskDueStatusChecker

func RunTaskDueStatusChecker()

func TaskRemainderSMSNotification

func TaskRemainderSMSNotification(task models.Task, customer *models.Customer)

Types

type CustomerService

type CustomerService struct {
	CustomerCollection *mongo.Collection
	TokenCollection    *mongo.Collection
	TaskCollection     *mongo.Collection
	// contains filtered or unexported fields
}

func (*CustomerService) CreateCustomer

func (p *CustomerService) CreateCustomer(user *models.Customer) (*models.CustomerResponse, error)

func (*CustomerService) CreateTask

func (p *CustomerService) CreateTask(user *models.Task) (*models.Task, error)

func (*CustomerService) DeleteTask

func (p *CustomerService) DeleteTask(user *models.EditTaskDetails) error

func (*CustomerService) EditTask

func (p *CustomerService) EditTask(user *models.EditTaskDetails) (*models.Task, error)

func (*CustomerService) GetTask

func (p *CustomerService) GetTask(user1 *models.EditTaskDetails) ([]models.Task3, error)

Get task by customerid and save as *pdf ----->

func (*CustomerService) GetbyTaskId

func (p *CustomerService) GetbyTaskId(user *models.EditTaskDetails) (*models.Task, error)

func (*CustomerService) InsertToken

func (p *CustomerService) InsertToken(user *models.Token) (*models.TokenResponse, error)

Jump to

Keyboard shortcuts

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