Documentation ¶
Index ¶
- func ConnectDb() (*gorm.DB, error)
- func InitDatabase()
- func ReConnetDB() error
- type Persist
- func (persist *Persist) AddressInfo(addr string) (bean.Addresses, error)
- func (persist *Persist) AdminLogin(userID, password string) (bean.AdminUsers, error)
- func (persist *Persist) AdminUserInfo(userID string) (bean.AdminUsers, error)
- func (persist *Persist) AllTokenTransfer(tokenAddr string, page int) ([]bean.TokenTransfer, error)
- func (persist *Persist) Close()
- func (persist *Persist) CountAllTokenTransfer() (uint64, error)
- func (persist *Persist) CountToken() (uint64, error)
- func (persist *Persist) CountTokenTransfer(tokenAddr string) (uint64, error)
- func (persist *Persist) CountUser() (uint64, error)
- func (persist *Persist) CreateAddress(address bean.Addresses) error
- func (persist *Persist) CreateAdminUser(user bean.AdminUsers) error
- func (persist *Persist) CreateToken(token bean.Tokens) error
- func (persist *Persist) CreateTokenTransfer(transfer bean.TokenTransfer) error
- func (persist *Persist) CreateUser(user bean.Users) error
- func (persist *Persist) CreateUserAddressTokens(userAddressToken bean.UserAddressTokens) error
- func (persist *Persist) DeleteUserAddressTokens(userID, address, tokenAddress string) error
- func (persist *Persist) GetUserAddressTokens(userID, address, tokenAddress string) (bean.UserAddressTokens, error)
- func (persist *Persist) ListAddress(userID string) ([]bean.Addresses, error)
- func (persist *Persist) ListToken(search string, page int) ([]bean.Tokens, error)
- func (persist *Persist) ListTokenTransfer(tokenAddr, addr string, page int) ([]bean.TokenTransfer, error)
- func (persist *Persist) ListUser(search string, page int) ([]bean.Users, error)
- func (persist *Persist) ListUserAddressTokens(userID, address string) ([]bean.UserAddressTokens, error)
- func (persist *Persist) Login(userID, password string) (bean.Users, error)
- func (persist *Persist) SumAllTokenTransfer() (int, error)
- func (persist *Persist) TokenInfo(addr string) (bean.Tokens, error)
- func (persist *Persist) UpdateAccountPwd(userID, address, keystore string) error
- func (persist *Persist) UpdateAdminUserPasswd(userID, new string) error
- func (persist *Persist) UpdateTokenWeight(addr string, weight int) error
- func (persist *Persist) UpdateUserPasswd(userID, new string) error
- func (persist *Persist) UserInfo(userID string) (bean.Users, error)
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Persist ¶
type Persist struct {
// contains filtered or unexported fields
}
Persist struct
var GPersist *Persist
GPersist global Persist
func (*Persist) AddressInfo ¶
AddressInfo AddressInfo Persist
func (*Persist) AdminLogin ¶
func (persist *Persist) AdminLogin(userID, password string) (bean.AdminUsers, error)
AdminLogin AdminLogin Persist
func (*Persist) AdminUserInfo ¶
func (persist *Persist) AdminUserInfo(userID string) (bean.AdminUsers, error)
AdminUserInfo AdminUserInfo Persist
func (*Persist) AllTokenTransfer ¶
AllTokenTransfer AllTokenTransfer
func (*Persist) CountAllTokenTransfer ¶
CountAllTokenTransfer CountAllTokenTransfer
func (*Persist) CountToken ¶
CountToken CountToken
func (*Persist) CountTokenTransfer ¶
CountTokenTransfer CountTokenTransfer
func (*Persist) CreateAddress ¶
CreateAddress CreateAddress Persist
func (*Persist) CreateAdminUser ¶
func (persist *Persist) CreateAdminUser(user bean.AdminUsers) error
CreateAdminUser CreateAdminUser Persist
func (*Persist) CreateToken ¶
CreateToken CreateToken Persist
func (*Persist) CreateTokenTransfer ¶
func (persist *Persist) CreateTokenTransfer(transfer bean.TokenTransfer) error
CreateTokenTransfer CreateTokenTransfer Persist
func (*Persist) CreateUser ¶
CreateUser CreateUser Persist
func (*Persist) CreateUserAddressTokens ¶
func (persist *Persist) CreateUserAddressTokens(userAddressToken bean.UserAddressTokens) error
CreateUserAddressTokens CreateUserAddressTokens Persist
func (*Persist) DeleteUserAddressTokens ¶
DeleteUserAddressTokens DeleteUserAddressTokens Persist
func (*Persist) GetUserAddressTokens ¶
func (persist *Persist) GetUserAddressTokens(userID, address, tokenAddress string) (bean.UserAddressTokens, error)
GetUserAddressTokens GetUserAddressTokens Persist
func (*Persist) ListAddress ¶
ListAddress ListAddress Persist
func (*Persist) ListTokenTransfer ¶
func (persist *Persist) ListTokenTransfer(tokenAddr, addr string, page int) ([]bean.TokenTransfer, error)
ListTokenTransfer ListTokenTransfer
func (*Persist) ListUserAddressTokens ¶
func (persist *Persist) ListUserAddressTokens(userID, address string) ([]bean.UserAddressTokens, error)
ListUserAddressTokens ListUserAddressTokens Persist
func (*Persist) SumAllTokenTransfer ¶
SumAllTokenTransfer SumAllTokenTransfer
func (*Persist) UpdateAccountPwd ¶
UpdateAccountPwd UpdateAccountPwd Persist
func (*Persist) UpdateAdminUserPasswd ¶
UpdateAdminUserPasswd UpdateAdminUserPasswd Persist
func (*Persist) UpdateTokenWeight ¶
UpdateTokenWeight UpdateTokenWeight Persist
func (*Persist) UpdateUserPasswd ¶
UpdateUserPasswd UpdateUserPasswd Persist