impl

package
v0.0.0-...-3311072 Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbBackendImpl

type DbBackendImpl struct {
	database.GormClient
}

DbBackendImpl ...

func NewDBBackend

func NewDBBackend(cfg *database.DBConnectCfg) (*DbBackendImpl, error)

NewDBBackend ...

func (*DbBackendImpl) CreateAccount

func (b *DbBackendImpl) CreateAccount(data *models.Account) error

CreateAccount implement create user account

func (*DbBackendImpl) CreateAddresses

func (b *DbBackendImpl) CreateAddresses(tx *gorm.DB, data []*models.Address) error

CreateAddresses implement create addresses

func (*DbBackendImpl) CreateFunds

func (b *DbBackendImpl) CreateFunds(tx *gorm.DB, data *models.PubFunds) error

CreateFunds implement receive funds interface

func (*DbBackendImpl) CreateImages

func (b *DbBackendImpl) CreateImages(tx *gorm.DB, data []*models.Image) error

CreateImages implement create images interface

func (*DbBackendImpl) CreateOrganization

func (b *DbBackendImpl) CreateOrganization(data *models.DonationStat) error

CreateOrganization implement create the donation statistics of organization interface

func (*DbBackendImpl) CreateSupplies

func (b *DbBackendImpl) CreateSupplies(tx *gorm.DB, data []*models.PubSupplies) error

CreateSupplies defines the created supplies

func (*DbBackendImpl) DBTransactionCommit

func (db *DbBackendImpl) DBTransactionCommit(tx *gorm.DB)

DBTransactionCommit ...

func (*DbBackendImpl) DBTransactionRollback

func (db *DbBackendImpl) DBTransactionRollback(tx *gorm.DB)

DBTransactionRollback ...

func (*DbBackendImpl) GetDBTransaction

func (db *DbBackendImpl) GetDBTransaction() *gorm.DB

GetDBTransaction ...

func (*DbBackendImpl) QueryAccount

func (b *DbBackendImpl) QueryAccount(openID, uid string) (*models.Account, error)

QueryAccount implement check user account exist or not

func (*DbBackendImpl) QueryFunds

func (b *DbBackendImpl) QueryFunds(uid, targetUID, userType, pubType string, params *structs.QueryParams) ([]*models.PubFunds, error)

QueryFunds implement query funds interface

func (*DbBackendImpl) QueryFundsDetail

func (b *DbBackendImpl) QueryFundsDetail(id string) (*models.FundsDetail, error)

QueryFundsDetail defines query publicity funds detail

func (*DbBackendImpl) QueryOrgCharities

func (b *DbBackendImpl) QueryOrgCharities(params *structs.QueryParams) ([]*structs.OrgCharitiesItems, error)

QueryOrgCharities implement query the donation statistics of organization charity interface

func (*DbBackendImpl) QueryOrgCharitiesDetail

func (b *DbBackendImpl) QueryOrgCharitiesDetail(uid string) (*structs.OrgCharitiesDetailItem, error)

QueryOrgCharitiesDetail implement query detail the donation statistics of charities interface

func (*DbBackendImpl) QueryPubByUser

func (b *DbBackendImpl) QueryPubByUser(uid, userType, targetUID, pubType string, params *structs.QueryParams) ([]*structs.PubUserItem, error)

QueryPubByUser defines the query of publicity by user

func (*DbBackendImpl) QueryPubByUserType

func (b *DbBackendImpl) QueryPubByUserType(userType, targetUID, pubType string, params *structs.QueryParams) ([]*structs.PubUserItem, error)

QueryPubByUserType defines the query of publicity by user type

func (*DbBackendImpl) QuerySupplies

func (b *DbBackendImpl) QuerySupplies(uid, targetUID, userType, pubType string, params *structs.QueryParams) ([]*models.PubSupplies, error)

QuerySupplies defines the query supplies

func (*DbBackendImpl) QuerySuppliesDetail

func (b *DbBackendImpl) QuerySuppliesDetail(id string) (*models.SuppliesDetail, error)

QuerySuppliesDetail defines query publicity funds detail

func (*DbBackendImpl) UpdateFunds

func (b *DbBackendImpl) UpdateFunds(tx *gorm.DB, fundsID, blockID string) error

UpdateFunds update funds information

func (*DbBackendImpl) UpdateFundsBC

func (b *DbBackendImpl) UpdateFundsBC(tx *gorm.DB, blockID string, funds *models.PubFunds) error

UpdateFundsBC implement update funds block chain call back

func (*DbBackendImpl) UpdateSuppliesBC

func (b *DbBackendImpl) UpdateSuppliesBC(tx *gorm.DB, blockID string, supplies *models.PubSupplies) error

UpdateSuppliesBC implement update supplies block chain call back

func (*DbBackendImpl) UpdateSuppliesList

func (b *DbBackendImpl) UpdateSuppliesList(tx *gorm.DB, ps []*models.PubSupplies, data []*structs.PubResp) error

UpdateSuppliesList update supplies information

Jump to

Keyboard shortcuts

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