services

package
v0.0.0-...-4c15c94 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 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 Core

type Core struct {
	Auth auth.Auth
	User User
	Loan Loan
}

func NewCore

func NewCore() *Core

type Loan

type Loan interface {
	Save(provider *providers.Provider, userXid string, amount, totalInstallments int, loanType string, requirementType string) (string, error)
	SaveDocuments(provider *providers.Provider, userXid, loanID, requirementType, fileName string) error
	GetLoans(provider *providers.Provider, userXid string) ([]*modeldb.Loan, error)
	GetLoanTypes(provider *providers.Provider) ([]*modeldb.LoanType, error)
	GetLoan(provider *providers.Provider, userXid string) (*modeldb.Loan, error)
	GetLoanByID(provider *providers.Provider, id string) (*modeldb.Loan, error)
	GetLoanOrders(provider *providers.Provider) ([]*modeldb.Loan, error)
	GetLoanRequirements(provider *providers.Provider, userXid, loanID string, documentType modeldb.DocumentType) ([]*modeldb.Requirement, error)
	GetDocuments(provider *providers.Provider, loanID uint) ([]*modeldb.Document, error)
	ChangeDocumentStatus(provider *providers.Provider, documentID string, note string, status modeldb.DocumentStatus) error
	Timeline(provider *providers.Provider, loan *modeldb.Loan) ([]*modeldb.TimelineState, error)
	ChangeLoanStatus(provider *providers.Provider, loanId string, status modeldb.LoanStatus) (bool, error)
}

type LoanImpl

type LoanImpl struct{}

func (*LoanImpl) ChangeDocumentStatus

func (r *LoanImpl) ChangeDocumentStatus(provider *providers.Provider, documentID, note string, status modeldb.DocumentStatus) error

func (*LoanImpl) ChangeLoanStatus

func (r *LoanImpl) ChangeLoanStatus(provider *providers.Provider, loanId string, status modeldb.LoanStatus) (bool, error)

func (*LoanImpl) GetDocuments

func (r *LoanImpl) GetDocuments(provider *providers.Provider, loanID uint) ([]*modeldb.Document, error)

func (*LoanImpl) GetLoan

func (r *LoanImpl) GetLoan(provider *providers.Provider, userXid string) (*modeldb.Loan, error)

func (*LoanImpl) GetLoanByID

func (r *LoanImpl) GetLoanByID(provider *providers.Provider, id string) (*modeldb.Loan, error)

func (*LoanImpl) GetLoanOrders

func (r *LoanImpl) GetLoanOrders(provider *providers.Provider) ([]*modeldb.Loan, error)

func (*LoanImpl) GetLoanRequirements

func (r *LoanImpl) GetLoanRequirements(provider *providers.Provider, userXid, loanID string, documentType modeldb.DocumentType) ([]*modeldb.Requirement, error)

func (*LoanImpl) GetLoanTypes

func (r *LoanImpl) GetLoanTypes(provider *providers.Provider) ([]*modeldb.LoanType, error)

func (*LoanImpl) GetLoans

func (r *LoanImpl) GetLoans(provider *providers.Provider, userXid string) ([]*modeldb.Loan, error)

func (*LoanImpl) Save

func (r *LoanImpl) Save(provider *providers.Provider, userXid string, amount, totalInstallments int, loanTypeID string, requirementType string) (string, error)

func (*LoanImpl) SaveDocuments

func (r *LoanImpl) SaveDocuments(provider *providers.Provider, userXid, loanID, requirementType, fileName string) error

func (*LoanImpl) Timeline

func (r *LoanImpl) Timeline(provider *providers.Provider, loan *modeldb.Loan) ([]*modeldb.TimelineState, error)

type User

type User interface {
	GetUser(provider *providers.Provider, userXid string) (*model.User, error)
	DeleteUser(provider *providers.Provider, userXid string) (bool, error)
	SaveUserInfo(provider *providers.Provider, userXid, name, identifierNumber string) error
	GetClients(provider *providers.Provider) ([]*model.User, error)
	GetStaff(provider *providers.Provider) ([]*model.User, error)
	ToggleDisableUser(provider *providers.Provider, userXid string) (bool, error)
}

type UserImpl

type UserImpl struct {
}

func (*UserImpl) DeleteUser

func (u *UserImpl) DeleteUser(provider *providers.Provider, userXid string) (bool, error)

func (*UserImpl) GetClients

func (u *UserImpl) GetClients(provider *providers.Provider) ([]*model.User, error)

func (*UserImpl) GetStaff

func (u *UserImpl) GetStaff(provider *providers.Provider) ([]*model.User, error)

func (*UserImpl) GetUser

func (u *UserImpl) GetUser(provider *providers.Provider, userXid string) (*model.User, error)

func (*UserImpl) SaveUserInfo

func (u *UserImpl) SaveUserInfo(provider *providers.Provider, userXid, name, identifierNumber string) error

func (*UserImpl) ToggleDisableUser

func (u *UserImpl) ToggleDisableUser(provider *providers.Provider, userXid string) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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