Documentation ¶
Index ¶
- Variables
- func AutoMigrate(db *gorm.DB)
- func Bind(c *gin.Context, obj interface{}) error
- func GenToken(id uuid.UUID) string
- func GetClient() *ethclient.Client
- func GetContractAddress(currency string) common.Address
- func GetDB() *gorm.DB
- func GetEnv(key string) string
- func GetTokenABI() string
- func InitClient() *ethclient.Client
- func InitDB() *gorm.DB
- func LoadENV()
- func RunSeed(db *gorm.DB, s SeedObject)
- func RunSeeds(db *gorm.DB, seeds []SeedObject)
- func StringTowei(str string) *big.Int
- func WeiToString(wei *big.Int) string
- type CommonError
- type Database
- type Seed
- type SeedObject
Constants ¶
This section is empty.
Variables ¶
View Source
var Client *ethclient.Client
View Source
var DB *gorm.DB
Functions ¶
func AutoMigrate ¶
func GetContractAddress ¶
func GetTokenABI ¶
func GetTokenABI() string
func InitClient ¶
func RunSeed ¶
func RunSeed(db *gorm.DB, s SeedObject)
func RunSeeds ¶
func RunSeeds(db *gorm.DB, seeds []SeedObject)
func StringTowei ¶
func WeiToString ¶
Types ¶
type CommonError ¶
type CommonError struct {
Errors map[string]interface{} `json:"errors"`
}
func NewError ¶
func NewError(key string, err error) CommonError
func NewValidationError ¶
func NewValidationError(err error) CommonError
Click to show internal directories.
Click to hide internal directories.