persist

package
v0.0.0-...-d73b759 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDb

func ConnectDb() (*gorm.DB, error)

ConnectDb connect Db

func InitDatabase

func InitDatabase()

InitDatabase Init Db

func ReConnetDB

func ReConnetDB() error

ReConnetDB ReConnetDB

Types

type Persist

type Persist struct {
	// contains filtered or unexported fields
}

Persist struct

var GPersist *Persist

GPersist global Persist

func GetPersist

func GetPersist() *Persist

GetPersist Get Persist

func (*Persist) AddressInfo

func (persist *Persist) AddressInfo(addr string) (bean.Addresses, error)

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

func (persist *Persist) AllTokenTransfer(tokenAddr string, page int) ([]bean.TokenTransfer, error)

AllTokenTransfer AllTokenTransfer

func (*Persist) Close

func (persist *Persist) Close()

Close Close db

func (*Persist) CountAllTokenTransfer

func (persist *Persist) CountAllTokenTransfer() (uint64, error)

CountAllTokenTransfer CountAllTokenTransfer

func (*Persist) CountToken

func (persist *Persist) CountToken() (uint64, error)

CountToken CountToken

func (*Persist) CountTokenTransfer

func (persist *Persist) CountTokenTransfer(tokenAddr string) (uint64, error)

CountTokenTransfer CountTokenTransfer

func (*Persist) CountUser

func (persist *Persist) CountUser() (uint64, error)

CountUser CountUser

func (*Persist) CreateAddress

func (persist *Persist) CreateAddress(address bean.Addresses) error

CreateAddress CreateAddress Persist

func (*Persist) CreateAdminUser

func (persist *Persist) CreateAdminUser(user bean.AdminUsers) error

CreateAdminUser CreateAdminUser Persist

func (*Persist) CreateToken

func (persist *Persist) CreateToken(token bean.Tokens) error

CreateToken CreateToken Persist

func (*Persist) CreateTokenTransfer

func (persist *Persist) CreateTokenTransfer(transfer bean.TokenTransfer) error

CreateTokenTransfer CreateTokenTransfer Persist

func (*Persist) CreateUser

func (persist *Persist) CreateUser(user bean.Users) error

CreateUser CreateUser Persist

func (*Persist) CreateUserAddressTokens

func (persist *Persist) CreateUserAddressTokens(userAddressToken bean.UserAddressTokens) error

CreateUserAddressTokens CreateUserAddressTokens Persist

func (*Persist) DeleteUserAddressTokens

func (persist *Persist) DeleteUserAddressTokens(userID, address, tokenAddress string) error

DeleteUserAddressTokens DeleteUserAddressTokens Persist

func (*Persist) GetUserAddressTokens

func (persist *Persist) GetUserAddressTokens(userID, address, tokenAddress string) (bean.UserAddressTokens, error)

GetUserAddressTokens GetUserAddressTokens Persist

func (*Persist) ListAddress

func (persist *Persist) ListAddress(userID string) ([]bean.Addresses, error)

ListAddress ListAddress Persist

func (*Persist) ListToken

func (persist *Persist) ListToken(search string, page int) ([]bean.Tokens, error)

ListToken ListToken

func (*Persist) ListTokenTransfer

func (persist *Persist) ListTokenTransfer(tokenAddr, addr string, page int) ([]bean.TokenTransfer, error)

ListTokenTransfer ListTokenTransfer

func (*Persist) ListUser

func (persist *Persist) ListUser(search string, page int) ([]bean.Users, error)

ListUser ListUser Persist

func (*Persist) ListUserAddressTokens

func (persist *Persist) ListUserAddressTokens(userID, address string) ([]bean.UserAddressTokens, error)

ListUserAddressTokens ListUserAddressTokens Persist

func (*Persist) Login

func (persist *Persist) Login(userID, password string) (bean.Users, error)

Login Login Persist

func (*Persist) SumAllTokenTransfer

func (persist *Persist) SumAllTokenTransfer() (int, error)

SumAllTokenTransfer SumAllTokenTransfer

func (*Persist) TokenInfo

func (persist *Persist) TokenInfo(addr string) (bean.Tokens, error)

TokenInfo TokenInfo Persist

func (*Persist) UpdateAccountPwd

func (persist *Persist) UpdateAccountPwd(userID, address, keystore string) error

UpdateAccountPwd UpdateAccountPwd Persist

func (*Persist) UpdateAdminUserPasswd

func (persist *Persist) UpdateAdminUserPasswd(userID, new string) error

UpdateAdminUserPasswd UpdateAdminUserPasswd Persist

func (*Persist) UpdateTokenWeight

func (persist *Persist) UpdateTokenWeight(addr string, weight int) error

UpdateTokenWeight UpdateTokenWeight Persist

func (*Persist) UpdateUserPasswd

func (persist *Persist) UpdateUserPasswd(userID, new string) error

UpdateUserPasswd UpdateUserPasswd Persist

func (*Persist) UserInfo

func (persist *Persist) UserInfo(userID string) (bean.Users, error)

UserInfo UserInfo Persist

type Result

type Result struct {
	Total int
}

Result Result

Jump to

Keyboard shortcuts

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