Documentation
¶
Index ¶
- type BranchRepository
- func (r *BranchRepository) CreateBranch(ctx context.Context, branch *repository.Branch) (repository.Branch, error)
- func (r *BranchRepository) GetBranchByID(ctx context.Context, id uint32) (repository.Branch, error)
- func (r *BranchRepository) GetReportBranchData(ctx context.Context, filters services.ReportFilters) ([]services.BranchReportData, services.BranchSummary, error)
- func (r *BranchRepository) ListBranches(ctx context.Context, search *string, pgData *pkg.PaginationMetadata) ([]repository.Branch, pkg.PaginationMetadata, error)
- func (r *BranchRepository) UpdateBranch(ctx context.Context, name string, id uint32) (repository.Branch, error)
- type ClientRepository
- func (r *ClientRepository) CreateClient(ctx context.Context, client *repository.Client) (repository.ClientFullData, error)
- func (q *ClientRepository) GetClientAdminsReportData(ctx context.Context, arg GetClientAdminsReportDataParams) ([]GetClientAdminsReportDataRow, error)
- func (q *ClientRepository) GetClientClientsReportData(ctx context.Context, arg GetClientClientsReportDataParams) (GetClientClientsReportDataRow, error)
- func (r *ClientRepository) GetClientFullData(ctx context.Context, id uint32) (repository.ClientFullData, error)
- func (r *ClientRepository) GetClientIDByPhoneNumber(ctx context.Context, phoneNumber string) (uint32, error)
- func (r *ClientRepository) GetReportClientAdminData(ctx context.Context, filters services.ReportFilters) ([]services.ClientAdminsReportData, services.ClientSummary, error)
- func (r *ClientRepository) GetReportClientClientsData(ctx context.Context, id uint32, filters services.ReportFilters) (services.ClientClientsReportData, error)
- func (r *ClientRepository) ListClients(ctx context.Context, category *repository.ClientCategorySearch, ...) ([]repository.ClientFullData, pkg.PaginationMetadata, error)
- func (r *ClientRepository) ListClientsByActiveStatus(ctx context.Context, active bool, pgData *pkg.PaginationMetadata) ([]repository.Client, error)
- func (r *ClientRepository) ListClientsByBranch(ctx context.Context, branchID uint32, pgData *pkg.PaginationMetadata) ([]repository.Client, error)
- func (r *ClientRepository) UpdateClient(ctx context.Context, client *repository.UpdateClient) error
- func (r *ClientRepository) UpdateClientOverpayment(ctx context.Context, phoneNumber string, overpayment float64) error
- type GetClientAdminsReportDataParams
- type GetClientAdminsReportDataRow
- type GetClientClientsReportDataParams
- type GetClientClientsReportDataRow
- type GetLoanEventsRow
- type GetLoanReportDataByIdRow
- type GetLoansReportDataParams
- type GetLoansReportDataRow
- type GetProductReportDataParams
- type GetProductReportDataRow
- type GetUserAdminsReportDataParams
- type GetUserAdminsReportDataRow
- type GetUserUsersReportDataParams
- type GetUserUsersReportDataRow
- type HelperRepository
- func (r *HelperRepository) GetBranchData(ctx context.Context) ([]repository.BranchData, error)
- func (r *HelperRepository) GetClientData(ctx context.Context) ([]repository.ClientData, error)
- func (r *HelperRepository) GetClientNonPayments(ctx context.Context, id uint32, phoneNumber string, ...) ([]repository.NonPostedShort, pkg.PaginationMetadata, error)
- func (r *HelperRepository) GetDashboardData(ctx context.Context) (repository.DashboardData, error)
- func (r *HelperRepository) GetLoanData(ctx context.Context) ([]repository.LoanData, error)
- func (r *HelperRepository) GetLoanOfficerData(ctx context.Context) ([]repository.LoanOfficerData, error)
- func (r *HelperRepository) GetProductData(ctx context.Context) ([]repository.ProductData, error)
- func (r *HelperRepository) GetUserFullname(ctx context.Context, id uint32) (string, error)
- type LoanRepository
- func (r *LoanRepository) CreateLoan(ctx context.Context, loan *repository.Loan) (repository.LoanFullData, error)
- func (r *LoanRepository) DeleteLoan(ctx context.Context, id uint32) error
- func (r *LoanRepository) DisburseLoan(ctx context.Context, disburseLoan *repository.DisburseLoan) (uint32, error)
- func (t *LoanRepository) GetClientActiceLoan(ctx context.Context, clientID uint32) (uint32, error)
- func (r *LoanRepository) GetClientLoans(ctx context.Context, clientID uint32, category *repository.Category, ...) ([]repository.LoanFullData, pkg.PaginationMetadata, error)
- func (r *LoanRepository) GetExpectedPayments(ctx context.Context, category *repository.Category, ...) ([]repository.ExpectedPayment, pkg.PaginationMetadata, error)
- func (r *LoanRepository) GetInstallment(ctx context.Context, id uint32) (repository.Installment, error)
- func (r *LoanRepository) GetLoan(ctx context.Context, id uint32) (repository.LoanShort, error)
- func (r *LoanRepository) GetLoanByID(ctx context.Context, id uint32) (repository.Loan, error)
- func (r *LoanRepository) GetLoanEvents(ctx context.Context) ([]repository.LoanEvent, error)
- func (q *LoanRepository) GetLoanEventsHelper(ctx context.Context) ([]GetLoanEventsRow, error)
- func (r *LoanRepository) GetLoanInstallments(ctx context.Context, id uint32) ([]repository.Installment, error)
- func (q *LoanRepository) GetLoanReportDataById(ctx context.Context, id uint32) (GetLoanReportDataByIdRow, error)
- func (r *LoanRepository) GetLoanStatus(ctx context.Context, id uint32) (string, error)
- func (q *LoanRepository) GetLoansReportData(ctx context.Context, arg GetLoansReportDataParams) ([]GetLoansReportDataRow, error)
- func (r *LoanRepository) GetReportLoanByIdData(ctx context.Context, id uint32) (services.LoanReportDataById, error)
- func (r *LoanRepository) GetReportLoanData(ctx context.Context, filters services.ReportFilters) ([]services.LoanReportData, services.LoanSummary, error)
- func (r *LoanRepository) ListLoans(ctx context.Context, category *repository.Category, ...) ([]repository.LoanFullData, pkg.PaginationMetadata, error)
- func (r *LoanRepository) ListUnpaidInstallmentsData(ctx context.Context, category *repository.Category, ...) ([]repository.UnpaidInstallmentData, pkg.PaginationMetadata, error)
- func (r *LoanRepository) TransferLoan(ctx context.Context, officerId uint32, loanId uint32, adminId uint32) error
- func (r *LoanRepository) UpdateInstallment(ctx context.Context, installment *repository.UpdateInstallment) (repository.Installment, error)
- type MySQLRepo
- type NonPostedRepository
- func (r *NonPostedRepository) CreateNonPosted(ctx context.Context, nonPosted *repository.NonPosted) (repository.NonPosted, error)
- func (r *NonPostedRepository) DeleteNonPosted(ctx context.Context, id uint32, description string) error
- func (r *NonPostedRepository) GetClientNonPosted(ctx context.Context, id uint32, phoneNumber string, ...) (repository.ClientNonPosted, pkg.PaginationMetadata, error)
- func (r *NonPostedRepository) GetNonPosted(ctx context.Context, id uint32) (repository.NonPosted, error)
- func (r *NonPostedRepository) GetReportPaymentData(ctx context.Context, filters services.ReportFilters) ([]services.PaymentReportData, services.PaymentSummary, error)
- func (r *NonPostedRepository) ListNonPosted(ctx context.Context, category *repository.NonPostedCategory, ...) ([]repository.NonPosted, pkg.PaginationMetadata, error)
- func (r *NonPostedRepository) ListNonPostedByTransactionSource(ctx context.Context, transactionSource string, pgData *pkg.PaginationMetadata) ([]repository.NonPosted, error)
- func (r *NonPostedRepository) ListPaymentAllocationsByNonPostedId(ctx context.Context, id uint32) ([]repository.PaymentAllocation, error)
- func (r *NonPostedRepository) ListUnassignedNonPosted(ctx context.Context, pgData *pkg.PaginationMetadata) ([]repository.NonPosted, error)
- func (r *NonPostedRepository) UpdateNonPosted(ctx context.Context, nonPosted *repository.NonPosted) error
- type ProductRepository
- func (r *ProductRepository) CreateProduct(ctx context.Context, product *repository.Product) (repository.Product, error)
- func (r *ProductRepository) DeleteProduct(ctx context.Context, id uint32) error
- func (r *ProductRepository) GetAllProducts(ctx context.Context, search *string, pgData *pkg.PaginationMetadata) ([]repository.Product, pkg.PaginationMetadata, error)
- func (r *ProductRepository) GetProductByID(ctx context.Context, id uint32) (repository.Product, error)
- func (q *ProductRepository) GetProductReportData(ctx context.Context, arg GetProductReportDataParams) ([]GetProductReportDataRow, error)
- func (r *ProductRepository) GetReportProductData(ctx context.Context, filters services.ReportFilters) ([]services.ProductReportData, services.ProductSummary, error)
- func (r *ProductRepository) ListProductByBranch(ctx context.Context, branchID uint32, pgData *pkg.PaginationMetadata) ([]repository.Product, error)
- type Store
- type UserRepository
- func (r *UserRepository) CheckUserExistance(ctx context.Context, email string) bool
- func (r *UserRepository) CreateUser(ctx context.Context, user *repository.User) (repository.User, error)
- func (r *UserRepository) GetReportUserAdminData(ctx context.Context, filters services.ReportFilters) ([]services.UserAdminsReportData, services.UserAdminsSummary, error)
- func (r *UserRepository) GetReportUserUsersData(ctx context.Context, id uint32, filters services.ReportFilters) (services.UserUsersReportData, error)
- func (q *UserRepository) GetUserAdminsReportData(ctx context.Context, arg GetUserAdminsReportDataParams) ([]GetUserAdminsReportDataRow, error)
- func (r *UserRepository) GetUserByEmail(ctx context.Context, email string) (repository.User, error)
- func (r *UserRepository) GetUserByID(ctx context.Context, id uint32) (repository.User, error)
- func (q *UserRepository) GetUserUsersReportData(ctx context.Context, arg GetUserUsersReportDataParams) (GetUserUsersReportDataRow, error)
- func (r *UserRepository) ListUsers(ctx context.Context, category *repository.CategorySearch, ...) ([]repository.User, pkg.PaginationMetadata, error)
- func (r *UserRepository) UpdateUser(ctx context.Context, user *repository.UpdateUser) (repository.User, error)
- func (r *UserRepository) UpdateUserPassword(ctx context.Context, email string, password string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchRepository ¶
type BranchRepository struct {
// contains filtered or unexported fields
}
func NewBranchRepository ¶
func NewBranchRepository(db *Store) *BranchRepository
func (*BranchRepository) CreateBranch ¶
func (r *BranchRepository) CreateBranch( ctx context.Context, branch *repository.Branch, ) (repository.Branch, error)
func (*BranchRepository) GetBranchByID ¶
func (r *BranchRepository) GetBranchByID( ctx context.Context, id uint32, ) (repository.Branch, error)
func (*BranchRepository) GetReportBranchData ¶
func (r *BranchRepository) GetReportBranchData( ctx context.Context, filters services.ReportFilters, ) ([]services.BranchReportData, services.BranchSummary, error)
func (*BranchRepository) ListBranches ¶
func (r *BranchRepository) ListBranches( ctx context.Context, search *string, pgData *pkg.PaginationMetadata, ) ([]repository.Branch, pkg.PaginationMetadata, error)
func (*BranchRepository) UpdateBranch ¶
func (r *BranchRepository) UpdateBranch( ctx context.Context, name string, id uint32, ) (repository.Branch, error)
type ClientRepository ¶
type ClientRepository struct {
// contains filtered or unexported fields
}
func NewClientRepository ¶
func NewClientRepository(db *Store) *ClientRepository
func (*ClientRepository) CreateClient ¶
func (r *ClientRepository) CreateClient( ctx context.Context, client *repository.Client, ) (repository.ClientFullData, error)
func (*ClientRepository) GetClientAdminsReportData ¶
func (q *ClientRepository) GetClientAdminsReportData(ctx context.Context, arg GetClientAdminsReportDataParams) ([]GetClientAdminsReportDataRow, error)
func (*ClientRepository) GetClientClientsReportData ¶
func (q *ClientRepository) GetClientClientsReportData(ctx context.Context, arg GetClientClientsReportDataParams) (GetClientClientsReportDataRow, error)
func (*ClientRepository) GetClientFullData ¶
func (r *ClientRepository) GetClientFullData( ctx context.Context, id uint32, ) (repository.ClientFullData, error)
func (*ClientRepository) GetClientIDByPhoneNumber ¶
func (*ClientRepository) GetReportClientAdminData ¶
func (r *ClientRepository) GetReportClientAdminData( ctx context.Context, filters services.ReportFilters, ) ([]services.ClientAdminsReportData, services.ClientSummary, error)
func (*ClientRepository) GetReportClientClientsData ¶
func (r *ClientRepository) GetReportClientClientsData( ctx context.Context, id uint32, filters services.ReportFilters, ) (services.ClientClientsReportData, error)
func (*ClientRepository) ListClients ¶
func (r *ClientRepository) ListClients( ctx context.Context, category *repository.ClientCategorySearch, pgData *pkg.PaginationMetadata, ) ([]repository.ClientFullData, pkg.PaginationMetadata, error)
func (*ClientRepository) ListClientsByActiveStatus ¶
func (r *ClientRepository) ListClientsByActiveStatus( ctx context.Context, active bool, pgData *pkg.PaginationMetadata, ) ([]repository.Client, error)
func (*ClientRepository) ListClientsByBranch ¶
func (r *ClientRepository) ListClientsByBranch( ctx context.Context, branchID uint32, pgData *pkg.PaginationMetadata, ) ([]repository.Client, error)
func (*ClientRepository) UpdateClient ¶
func (r *ClientRepository) UpdateClient( ctx context.Context, client *repository.UpdateClient, ) error
func (*ClientRepository) UpdateClientOverpayment ¶
func (r *ClientRepository) UpdateClientOverpayment( ctx context.Context, phoneNumber string, overpayment float64, ) error
used during transactions
type GetClientAdminsReportDataRow ¶
type GetClientAdminsReportDataRow struct { Name string `json:"name"` BranchName sql.NullString `json:"branch_name"` TotalLoanGiven int64 `json:"total_loan_given"` DefaultedLoans int64 `json:"defaulted_loans"` ActiveLoans int64 `json:"active_loans"` CompletedLoans int64 `json:"completed_loans"` InactiveLoans int64 `json:"inactive_loans"` Overpayment float64 `json:"overpayment"` PhoneNumber string `json:"phone_number"` TotalPaid interface{} `json:"total_paid"` TotalDisbursed interface{} `json:"total_disbursed"` TotalOwed interface{} `json:"total_owed"` RateScore interface{} `json:"rate_score"` DefaultRate interface{} `json:"default_rate"` }
type GetClientClientsReportDataRow ¶
type GetClientClientsReportDataRow struct { Name string `json:"name"` PhoneNumber string `json:"phone_number"` IDNumber sql.NullString `json:"id_number"` Dob sql.NullTime `json:"dob"` BranchName sql.NullString `json:"branch_name"` AssignedStaff sql.NullString `json:"assigned_staff"` Active bool `json:"active"` Loans interface{} `json:"loans"` Payments interface{} `json:"payments"` }
type GetLoanEventsRow ¶
type GetLoanReportDataByIdRow ¶
type GetLoanReportDataByIdRow struct { LoanID uint32 `json:"loan_id"` ClientName string `json:"client_name"` LoanAmount float64 `json:"loan_amount"` RepayAmount float64 `json:"repay_amount"` PaidAmount float64 `json:"paid_amount"` Status string `json:"status"` TotalInstallments int64 `json:"total_installments"` PaidInstallments int64 `json:"paid_installments"` RemainingInstallments int64 `json:"remaining_installments"` InstallmentDetails interface{} `json:"installment_details"` }
type GetLoansReportDataRow ¶
type GetLoansReportDataRow struct { LoanID uint32 `json:"loan_id"` ClientName string `json:"client_name"` BranchName string `json:"branch_name"` LoanOfficer string `json:"loan_officer"` LoanAmount float64 `json:"loan_amount"` RepayAmount float64 `json:"repay_amount"` PaidAmount float64 `json:"paid_amount"` OutstandingAmount interface{} `json:"outstanding_amount"` Status string `json:"status"` TotalInstallments uint32 `json:"total_installments"` PaidInstallments int64 `json:"paid_installments"` DueDate sql.NullTime `json:"due_date"` DisbursedDate sql.NullTime `json:"disbursed_date"` DefaultRisk interface{} `json:"default_risk"` }
type GetProductReportDataRow ¶
type GetProductReportDataRow struct { ProductName string `json:"product_name"` TotalLoansIssued int64 `json:"total_loans_issued"` TotalAmountDisbursed interface{} `json:"total_amount_disbursed"` TotalAmountRepaid interface{} `json:"total_amount_repaid"` TotalOutstandingAmount interface{} `json:"total_outstanding_amount"` ActiveLoans int64 `json:"active_loans"` CompletedLoans int64 `json:"completed_loans"` DefaultedLoans int64 `json:"defaulted_loans"` DefaultRate interface{} `json:"default_rate"` }
type GetUserAdminsReportDataRow ¶
type GetUserAdminsReportDataRow struct { Name string `json:"name"` Role string `json:"role"` BranchName sql.NullString `json:"branch_name"` ApprovedLoans int64 `json:"approved_loans"` ActiveLoans int64 `json:"active_loans"` CompletedLoans int64 `json:"completed_loans"` DefaultRate interface{} `json:"default_rate"` ClientsRegistered int64 `json:"clients_registered"` PaymentsAssigned int64 `json:"payments_assigned"` }
type GetUserUsersReportDataRow ¶
type GetUserUsersReportDataRow struct { Name string `json:"name"` Role string `json:"role"` Branch sql.NullString `json:"branch"` TotalClientsHandled int64 `json:"total_clients_handled"` LoansApproved int64 `json:"loans_approved"` TotalLoanAmountManaged interface{} `json:"total_loan_amount_managed"` TotalCollectedAmount interface{} `json:"total_collected_amount"` DefaultRate interface{} `json:"default_rate"` AssignedPayments int64 `json:"assigned_payments"` AssignedLoans interface{} `json:"assigned_loans"` AssignedPaymentsList interface{} `json:"assigned_payments_list"` }
type HelperRepository ¶
type HelperRepository struct {
// contains filtered or unexported fields
}
func NewHelperRepository ¶
func NewHelperRepository(db *Store) *HelperRepository
func (*HelperRepository) GetBranchData ¶
func (r *HelperRepository) GetBranchData(ctx context.Context) ([]repository.BranchData, error)
func (*HelperRepository) GetClientData ¶
func (r *HelperRepository) GetClientData(ctx context.Context) ([]repository.ClientData, error)
func (*HelperRepository) GetClientNonPayments ¶
func (r *HelperRepository) GetClientNonPayments( ctx context.Context, id uint32, phoneNumber string, pgData *pkg.PaginationMetadata, ) ([]repository.NonPostedShort, pkg.PaginationMetadata, error)
func (*HelperRepository) GetDashboardData ¶
func (r *HelperRepository) GetDashboardData(ctx context.Context) (repository.DashboardData, error)
func (*HelperRepository) GetLoanData ¶
func (r *HelperRepository) GetLoanData(ctx context.Context) ([]repository.LoanData, error)
func (*HelperRepository) GetLoanOfficerData ¶
func (r *HelperRepository) GetLoanOfficerData( ctx context.Context, ) ([]repository.LoanOfficerData, error)
func (*HelperRepository) GetProductData ¶
func (r *HelperRepository) GetProductData(ctx context.Context) ([]repository.ProductData, error)
func (*HelperRepository) GetUserFullname ¶
type LoanRepository ¶
type LoanRepository struct {
// contains filtered or unexported fields
}
func NewLoanRepository ¶
func NewLoanRepository(db *Store) *LoanRepository
func (*LoanRepository) CreateLoan ¶
func (r *LoanRepository) CreateLoan( ctx context.Context, loan *repository.Loan, ) (repository.LoanFullData, error)
func (*LoanRepository) DeleteLoan ¶
func (r *LoanRepository) DeleteLoan(ctx context.Context, id uint32) error
func (*LoanRepository) DisburseLoan ¶
func (r *LoanRepository) DisburseLoan( ctx context.Context, disburseLoan *repository.DisburseLoan, ) (uint32, error)
func (*LoanRepository) GetClientActiceLoan ¶
func (*LoanRepository) GetClientLoans ¶
func (r *LoanRepository) GetClientLoans( ctx context.Context, clientID uint32, category *repository.Category, pgData *pkg.PaginationMetadata, ) ([]repository.LoanFullData, pkg.PaginationMetadata, error)
func (*LoanRepository) GetExpectedPayments ¶
func (r *LoanRepository) GetExpectedPayments( ctx context.Context, category *repository.Category, pgData *pkg.PaginationMetadata, ) ([]repository.ExpectedPayment, pkg.PaginationMetadata, error)
func (*LoanRepository) GetInstallment ¶
func (r *LoanRepository) GetInstallment( ctx context.Context, id uint32, ) (repository.Installment, error)
func (*LoanRepository) GetLoan ¶
func (r *LoanRepository) GetLoan(ctx context.Context, id uint32) (repository.LoanShort, error)
func (*LoanRepository) GetLoanByID ¶
func (r *LoanRepository) GetLoanByID(ctx context.Context, id uint32) (repository.Loan, error)
func (*LoanRepository) GetLoanEvents ¶
func (r *LoanRepository) GetLoanEvents(ctx context.Context) ([]repository.LoanEvent, error)
func (*LoanRepository) GetLoanEventsHelper ¶
func (q *LoanRepository) GetLoanEventsHelper(ctx context.Context) ([]GetLoanEventsRow, error)
func (*LoanRepository) GetLoanInstallments ¶
func (r *LoanRepository) GetLoanInstallments( ctx context.Context, id uint32, ) ([]repository.Installment, error)
func (*LoanRepository) GetLoanReportDataById ¶
func (q *LoanRepository) GetLoanReportDataById(ctx context.Context, id uint32) (GetLoanReportDataByIdRow, error)
func (*LoanRepository) GetLoanStatus ¶
func (*LoanRepository) GetLoansReportData ¶
func (q *LoanRepository) GetLoansReportData(ctx context.Context, arg GetLoansReportDataParams) ([]GetLoansReportDataRow, error)
func (*LoanRepository) GetReportLoanByIdData ¶
func (r *LoanRepository) GetReportLoanByIdData( ctx context.Context, id uint32, ) (services.LoanReportDataById, error)
func (*LoanRepository) GetReportLoanData ¶
func (r *LoanRepository) GetReportLoanData( ctx context.Context, filters services.ReportFilters, ) ([]services.LoanReportData, services.LoanSummary, error)
func (*LoanRepository) ListLoans ¶
func (r *LoanRepository) ListLoans( ctx context.Context, category *repository.Category, pgData *pkg.PaginationMetadata, ) ([]repository.LoanFullData, pkg.PaginationMetadata, error)
func (*LoanRepository) ListUnpaidInstallmentsData ¶
func (r *LoanRepository) ListUnpaidInstallmentsData( ctx context.Context, category *repository.Category, pgData *pkg.PaginationMetadata, ) ([]repository.UnpaidInstallmentData, pkg.PaginationMetadata, error)
func (*LoanRepository) TransferLoan ¶
func (*LoanRepository) UpdateInstallment ¶
func (r *LoanRepository) UpdateInstallment( ctx context.Context, installment *repository.UpdateInstallment, ) (repository.Installment, error)
type MySQLRepo ¶
type MySQLRepo struct { Branches repository.BranchRepository Loans repository.LoansRepository Products repository.ProductRepository Users repository.UserRepository Clients repository.ClientRepository NonPosted repository.NonPostedRepository Helpers repository.HelperRepository }
func NewMySQLRepo ¶
type NonPostedRepository ¶
type NonPostedRepository struct {
// contains filtered or unexported fields
}
func NewNonPostedRepository ¶
func NewNonPostedRepository(db *Store) *NonPostedRepository
func (*NonPostedRepository) CreateNonPosted ¶
func (r *NonPostedRepository) CreateNonPosted( ctx context.Context, nonPosted *repository.NonPosted, ) (repository.NonPosted, error)
func (*NonPostedRepository) DeleteNonPosted ¶
func (*NonPostedRepository) GetClientNonPosted ¶
func (r *NonPostedRepository) GetClientNonPosted( ctx context.Context, id uint32, phoneNumber string, pgData *pkg.PaginationMetadata, ) (repository.ClientNonPosted, pkg.PaginationMetadata, error)
func (*NonPostedRepository) GetNonPosted ¶
func (r *NonPostedRepository) GetNonPosted( ctx context.Context, id uint32, ) (repository.NonPosted, error)
func (*NonPostedRepository) GetReportPaymentData ¶
func (r *NonPostedRepository) GetReportPaymentData( ctx context.Context, filters services.ReportFilters, ) ([]services.PaymentReportData, services.PaymentSummary, error)
func (*NonPostedRepository) ListNonPosted ¶
func (r *NonPostedRepository) ListNonPosted( ctx context.Context, category *repository.NonPostedCategory, pgData *pkg.PaginationMetadata, ) ([]repository.NonPosted, pkg.PaginationMetadata, error)
func (*NonPostedRepository) ListNonPostedByTransactionSource ¶
func (r *NonPostedRepository) ListNonPostedByTransactionSource( ctx context.Context, transactionSource string, pgData *pkg.PaginationMetadata, ) ([]repository.NonPosted, error)
func (*NonPostedRepository) ListPaymentAllocationsByNonPostedId ¶
func (r *NonPostedRepository) ListPaymentAllocationsByNonPostedId( ctx context.Context, id uint32, ) ([]repository.PaymentAllocation, error)
func (*NonPostedRepository) ListUnassignedNonPosted ¶
func (r *NonPostedRepository) ListUnassignedNonPosted( ctx context.Context, pgData *pkg.PaginationMetadata, ) ([]repository.NonPosted, error)
func (*NonPostedRepository) UpdateNonPosted ¶
func (r *NonPostedRepository) UpdateNonPosted( ctx context.Context, nonPosted *repository.NonPosted, ) error
type ProductRepository ¶
type ProductRepository struct {
// contains filtered or unexported fields
}
func NewProductRepository ¶
func NewProductRepository(db *Store) *ProductRepository
func (*ProductRepository) CreateProduct ¶
func (r *ProductRepository) CreateProduct( ctx context.Context, product *repository.Product, ) (repository.Product, error)
func (*ProductRepository) DeleteProduct ¶
func (r *ProductRepository) DeleteProduct(ctx context.Context, id uint32) error
func (*ProductRepository) GetAllProducts ¶
func (r *ProductRepository) GetAllProducts( ctx context.Context, search *string, pgData *pkg.PaginationMetadata, ) ([]repository.Product, pkg.PaginationMetadata, error)
func (*ProductRepository) GetProductByID ¶
func (r *ProductRepository) GetProductByID( ctx context.Context, id uint32, ) (repository.Product, error)
func (*ProductRepository) GetProductReportData ¶
func (q *ProductRepository) GetProductReportData(ctx context.Context, arg GetProductReportDataParams) ([]GetProductReportDataRow, error)
func (*ProductRepository) GetReportProductData ¶
func (r *ProductRepository) GetReportProductData( ctx context.Context, filters services.ReportFilters, ) ([]services.ProductReportData, services.ProductSummary, error)
func (*ProductRepository) ListProductByBranch ¶
func (r *ProductRepository) ListProductByBranch( ctx context.Context, branchID uint32, pgData *pkg.PaginationMetadata, ) ([]repository.Product, error)
type Store ¶
type Store struct { NewQuerierFn func(tx *sql.Tx) generated.Querier // contains filtered or unexported fields }
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(db *Store) *UserRepository
func (*UserRepository) CheckUserExistance ¶
func (r *UserRepository) CheckUserExistance(ctx context.Context, email string) bool
func (*UserRepository) CreateUser ¶
func (r *UserRepository) CreateUser( ctx context.Context, user *repository.User, ) (repository.User, error)
func (*UserRepository) GetReportUserAdminData ¶
func (r *UserRepository) GetReportUserAdminData( ctx context.Context, filters services.ReportFilters, ) ([]services.UserAdminsReportData, services.UserAdminsSummary, error)
func (*UserRepository) GetReportUserUsersData ¶
func (r *UserRepository) GetReportUserUsersData( ctx context.Context, id uint32, filters services.ReportFilters, ) (services.UserUsersReportData, error)
func (*UserRepository) GetUserAdminsReportData ¶
func (q *UserRepository) GetUserAdminsReportData(ctx context.Context, arg GetUserAdminsReportDataParams) ([]GetUserAdminsReportDataRow, error)
func (*UserRepository) GetUserByEmail ¶
func (r *UserRepository) GetUserByEmail( ctx context.Context, email string, ) (repository.User, error)
func (*UserRepository) GetUserByID ¶
func (r *UserRepository) GetUserByID(ctx context.Context, id uint32) (repository.User, error)
func (*UserRepository) GetUserUsersReportData ¶
func (q *UserRepository) GetUserUsersReportData(ctx context.Context, arg GetUserUsersReportDataParams) (GetUserUsersReportDataRow, error)
func (*UserRepository) ListUsers ¶
func (r *UserRepository) ListUsers( ctx context.Context, category *repository.CategorySearch, pgData *pkg.PaginationMetadata, ) ([]repository.User, pkg.PaginationMetadata, error)
func (*UserRepository) UpdateUser ¶
func (r *UserRepository) UpdateUser( ctx context.Context, user *repository.UpdateUser, ) (repository.User, error)
func (*UserRepository) UpdateUserPassword ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.