models

package
v1.1.14 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetIDs added in v1.1.14

func AssetIDs(assets []Asset) []string

Types

type Address added in v1.1.9

type Address struct {
	ID      uint   `gorm:"primary_key"`
	Address string `gorm:"type:varchar(128); uniqueIndex"`
}

type AddressToAssetAssociation added in v1.1.9

type AddressToAssetAssociation struct {
	CreatedAt time.Time  `gorm:"index:,"`
	DeletedAt *time.Time `gorm:"index:,; default:NULL"`

	Address   Address `gorm:"ForeignKey:AddressID; not null"`
	AddressID uint    `gorm:"primaryKey; autoIncrement:false; index:,"`

	Asset   Asset `gorm:"ForeignKey:AssetID; not null"`
	AssetID uint  `gorm:"primaryKey; autoIncrement:false; index:,"`
}

type Asset added in v1.1.9

type Asset struct {
	CreatedAt time.Time `gorm:"index:,"`
	ID        uint      `gorm:"primary_key; uniqueIndex"`
	Asset     string    `gorm:"type:varchar(128); uniqueIndex"`

	Decimals uint   `gorm:"int(4)"`
	Name     string `gorm:"type:varchar(128)"`
	Symbol   string `gorm:"type:varchar(128)"`
	Type     string `gorm:"type:varchar(12)"`
	Coin     uint
}

type AssetSubscription added in v1.1.9

type AssetSubscription struct {
	DeletedAt *time.Time `gorm:"default:NULL; index"`
	Address   Address    `gorm:"ForeignKey:AddressID; not null"`
	AddressID uint       `gorm:"primary_key; autoIncrement:false"`
}

type NotificationSubscription added in v1.1.9

type NotificationSubscription struct {
	DeletedAt *time.Time `gorm:"default:NULL; index"`
	Address   Address    `gorm:"ForeignKey:AddressID; not null"`
	AddressID uint       `gorm:"primary_key; autoIncrement:false"`
}

type Tracker

type Tracker struct {
	UpdatedAt time.Time
	Coin      string `gorm:"primary_key:true; type:varchar(64)"`
	Height    int64
}

Jump to

Keyboard shortcuts

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