repository

package
v0.0.0-...-753941a Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomerRepository

type CustomerRepository interface {
	CreateCustomer(req *model.CreateCustomerRequest) (int64, bool, error)
	UpdateVerifiedCustomer(email string) (bool, error)
	GetCustomerIDByEmail(req *model.GetCustomerIDByEmailRequest) (int64, error)
	GetCustomerDetailsByEmail(req *model.GetCustomerDetailsByEmailRequest) (*model.GetCustomerDetailsByEmailResponse, error)
	UpdateCustomerPasswordByEmail(req *model.UpdateCustomerPasswordByEmailRequest) (*model.UpdateCustomerPasswordByEmailResponse, error)
}

CustomerRepository is an interface that has all the function to be implemented inside customer repository

type CustomerRepositoryImpl

type CustomerRepositoryImpl struct {
	Context context.Context
	Config  *config.Configuration
	Logger  *logrus.Logger
	Tracer  *trace.TracerProvider
	DB      *pgxpool.Pool
	Redis   *redis.Client
}

CustomerRepositoryImpl is an app customer struct that consists of all the dependencies needed for customer repository

func NewCustomerRepository

func NewCustomerRepository(ctx context.Context, config *config.Configuration, logger *logrus.Logger, tracer *trace.TracerProvider, db *pgxpool.Pool, rds *redis.Client) *CustomerRepositoryImpl

NewCustomerRepository return new instances customer repository

func (*CustomerRepositoryImpl) CreateCustomer

func (cr *CustomerRepositoryImpl) CreateCustomer(req *model.CreateCustomerRequest) (int64, bool, error)

func (*CustomerRepositoryImpl) GetCustomerDetailsByEmail

func (*CustomerRepositoryImpl) GetCustomerIDByEmail

func (cr *CustomerRepositoryImpl) GetCustomerIDByEmail(req *model.GetCustomerIDByEmailRequest) (int64, error)

func (*CustomerRepositoryImpl) UpdateVerifiedCustomer

func (cr *CustomerRepositoryImpl) UpdateVerifiedCustomer(email string) (bool, error)

type HealthCheckRepository

type HealthCheckRepository interface {
	Check() (bool, error)
}

HealthCheckRepository is an interface that has all the function to be implemented inside health check repository

type HealthCheckRepositoryImpl

type HealthCheckRepositoryImpl struct {
	Context context.Context
	Config  *config.Configuration
	Logger  *logrus.Logger
	Tracer  *trace.TracerProvider
	DB      *pgxpool.Pool
	Redis   *redis.Client
}

HealthCheckRepositoryImpl is an app health check struct that consists of all the dependencies needed for health check repository

func NewHealthCheckRepository

func NewHealthCheckRepository(ctx context.Context, config *config.Configuration, logger *logrus.Logger, tracer *trace.TracerProvider, db *pgxpool.Pool, rds *redis.Client) *HealthCheckRepositoryImpl

NewHealthCheckRepository return new instances health check repository

func (*HealthCheckRepositoryImpl) Check

func (hr *HealthCheckRepositoryImpl) Check() (bool, error)

Jump to

Keyboard shortcuts

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