model

package
v0.0.0-...-032cc0f Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameCexBinanceKlineCsv = "cex_binance_kline_csv"
View Source
const TableNameCexOrder = "cex_order"
View Source
const TableNameCexSellOrder = "cex_sell_order"
View Source
const TableNameChainbotBot = "chainbot_bot"
View Source
const TableNameChainbotBotTemplate = "chainbot_bot_template"

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
	DeletedAt *time.Time `json:"deletedAt"`
}

type CexBinanceKline

type CexBinanceKline struct {
	Event                string  `json:"event"`
	StartTime            int     `json:"start_time"`
	EndTime              int     `json:"end_time"`
	Symbol               string  `json:"symbol"`
	Interval             string  `json:"interval"`
	FirstTradeID         int     `json:"first_trade_id"`
	LastTradeID          int     `json:"last_trade_id"`
	Open                 float64 `json:"open"`
	Close                float64 `json:"close"`
	High                 float64 `json:"high"`
	Low                  float64 `json:"low"`
	Volume               string  `json:"volume"`
	TradeNum             int     `json:"trade_num"`
	IsFinal              bool    `json:"is_final"`
	QuoteVolume          string  `json:"quote_volume"`
	ActiveBuyVolume      string  `json:"active_buy_volume"`
	ActiveBuyQuoteVolume string  `json:"active_buy_quote_volume"`
}

func (CexBinanceKline) TableName

func (CexBinanceKline) TableName() string

type CexBinanceKlineCsv

type CexBinanceKlineCsv struct {
	ID        int64          `gorm:"column:id;primaryKey" json:"id"`
	Event     string         `gorm:"column:event;not null" json:"event"`
	Symbol    string         `gorm:"column:symbol;not null" json:"symbol"`
	Interval  string         `gorm:"column:interval;not null" json:"interval"`
	StartTime int64          `gorm:"column:start_time;not null" json:"start_time"`
	EndTime   int64          `gorm:"column:end_time;not null" json:"end_time"`
	File      string         `gorm:"column:file;not null" json:"file"`
	CreatedAt time.Time      `gorm:"column:created_at;not null" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;not null" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;not null" json:"deleted_at"`
}

CexBinanceKlineCsv mapped from table <cex_binance_kline_csv>

func (*CexBinanceKlineCsv) TableName

func (*CexBinanceKlineCsv) TableName() string

TableName CexBinanceKlineCsv's table name

type CexOrder

type CexOrder struct {
	ID        int64          `gorm:"column:id;primaryKey" json:"id"`
	Symbol    string         `gorm:"column:symbol;not null" json:"symbol"`
	Price     float64        `gorm:"column:price;not null" json:"price"`
	Quantity  float64        `gorm:"column:quantity;not null" json:"quantity"`
	Status    int32          `gorm:"column:status;not null" json:"status"`
	CreateBy  int64          `gorm:"column:create_by;not null" json:"create_by"`
	UpdateBy  int64          `gorm:"column:update_by;not null" json:"update_by"`
	CreatedAt time.Time      `gorm:"column:created_at;not null" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;not null" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;not null" json:"deleted_at"`
}

CexOrder mapped from table <cex_order>

func (*CexOrder) TableName

func (*CexOrder) TableName() string

TableName CexOrder's table name

type CexSellOrder

type CexSellOrder struct {
	ID         int64          `gorm:"column:id;primaryKey" json:"id"`
	Symbol     string         `gorm:"column:symbol;not null" json:"symbol"`
	Price      float64        `gorm:"column:price;not null" json:"price"`
	Quantity   float64        `gorm:"column:quantity;not null" json:"quantity"`
	Status     int32          `gorm:"column:status;not null" json:"status"`
	BuyOrderID int64          `gorm:"column:buy_order_id;not null" json:"buy_order_id"`
	Sold       float64        `gorm:"column:sold;not null" json:"sold"`
	Profit     float64        `gorm:"column:profit;not null" json:"profit"`
	CreateBy   int64          `gorm:"column:create_by;not null" json:"create_by"`
	UpdateBy   int64          `gorm:"column:update_by;not null" json:"update_by"`
	CreatedAt  time.Time      `gorm:"column:created_at;not null" json:"created_at"`
	UpdatedAt  time.Time      `gorm:"column:updated_at;not null" json:"updated_at"`
	DeletedAt  gorm.DeletedAt `gorm:"column:deleted_at;not null" json:"deleted_at"`
}

CexSellOrder mapped from table <cex_sell_order>

func (*CexSellOrder) TableName

func (*CexSellOrder) TableName() string

TableName CexSellOrder's table name

type ChainbotBot

type ChainbotBot struct {
	ID             int64          `gorm:"column:id;primaryKey" json:"id"`
	BotID          string         `gorm:"column:bot_id;not null" json:"bot_id"`
	SubID          string         `gorm:"column:sub_id;not null" json:"sub_id"`
	DriverType     string         `gorm:"column:driver_type;not null" json:"driver_type"`
	NotifyTemplate string         `gorm:"column:notify_template;not null" json:"notify_template"`
	TemplateID     int64          `gorm:"column:template_id;not null" json:"template_id"`
	CreatedAt      time.Time      `gorm:"column:created_at;not null" json:"created_at"`
	UpdatedAt      time.Time      `gorm:"column:updated_at;not null" json:"updated_at"`
	DeletedAt      gorm.DeletedAt `gorm:"column:deleted_at;not null" json:"deleted_at"`
}

ChainbotBot mapped from table <chainbot_bot>

func (*ChainbotBot) TableName

func (*ChainbotBot) TableName() string

TableName ChainbotBot's table name

type ChainbotBotTemplate

type ChainbotBotTemplate struct {
	ID             int64          `gorm:"column:id;primaryKey" json:"id"`
	DriverType     string         `gorm:"column:driver_type;not null" json:"driver_type"`
	NotifyTemplate string         `gorm:"column:notify_template;not null" json:"notify_template"`
	CreatedAt      time.Time      `gorm:"column:created_at;not null" json:"created_at"`
	UpdatedAt      time.Time      `gorm:"column:updated_at;not null" json:"updated_at"`
	DeletedAt      gorm.DeletedAt `gorm:"column:deleted_at;not null" json:"deleted_at"`
}

ChainbotBotTemplate mapped from table <chainbot_bot_template>

func (*ChainbotBotTemplate) TableName

func (*ChainbotBotTemplate) TableName() string

TableName ChainbotBotTemplate's table name

type OrderCmd

type OrderCmd struct {
	Cmd string
}

type OrderStat

type OrderStat struct {
	Price    float64
	Quantity float64
	CreateAt time.Time
}

type ProfitStat

type ProfitStat struct {
}

type SingResult

type SingResult struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data string `json:"data"`
}

type TradeStat

type TradeStat struct {
	BuyerAmount  float64
	SellerAmount float64
}

Jump to

Keyboard shortcuts

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