model

package
v0.0.0-...-7c1f5ed Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Atom

type Atom struct {
	ID                int         `json:"id"`
	Name              string      `json:"name"`
	Symbol            string      `json:"symbol"`
	Slug              string      `json:"slug"`
	NumMarketPairs    int         `json:"num_market_pairs"`
	DateAdded         time.Time   `json:"date_added"`
	Tags              []string    `json:"tags"`
	MaxSupply         interface{} `json:"max_supply"`
	CirculatingSupply float64     `json:"circulating_supply"`
	TotalSupply       float64     `json:"total_supply"`
	IsActive          int         `json:"is_active"`
	Platform          interface{} `json:"platform"`
	CmcRank           int         `json:"cmc_rank"`
	IsFiat            int         `json:"is_fiat"`
	LastUpdated       time.Time   `json:"last_updated"`
	Quote             Quote       `json:"quote"`
}

type Btc

type Btc struct {
	ID                int         `json:"id"`
	Name              string      `json:"name"`
	Symbol            string      `json:"symbol"`
	Slug              string      `json:"slug"`
	NumMarketPairs    int         `json:"num_market_pairs"`
	DateAdded         time.Time   `json:"date_added"`
	Tags              []string    `json:"tags"`
	MaxSupply         int         `json:"max_supply"`
	CirculatingSupply int         `json:"circulating_supply"`
	TotalSupply       int         `json:"total_supply"`
	IsActive          int         `json:"is_active"`
	Platform          interface{} `json:"platform"`
	CmcRank           int         `json:"cmc_rank"`
	IsFiat            int         `json:"is_fiat"`
	LastUpdated       time.Time   `json:"last_updated"`
	Quote             Quote       `json:"quote"`
}

type Card

type Card struct {
	CommonTableCols
	CardID      string `json:"cardID" gorm:"type:char(36); unique; not null"`
	ColumnID    string `json:"columnID" gorm:"type:char(36); foreign_key; not null"`
	Name        string `json:"name" gorm:"not null"`
	Description string `json:"description"`
	Order       int    `json:"order" gorm:"not null"`
	Status      *bool  `json:"status"`
}

type Cmc

type Cmc struct {
	CommonTableCols
	CmcID       string    `json:"cmcID" gorm:"type:char(36); unique; not null"`
	Symbol      string    `json:"symbol"`
	Price       float64   `json:"price"`
	LastUpdated time.Time `json:"last_updated"`
}

type CmcListResponse

type CmcListResponse struct {
	CommonHTTPResponse
	CmcList []*Cmc `json:"cmc"`
}

CmcListResponse ...

type CmcResponse

type CmcResponse struct {
	CommonHTTPResponse
	Cmc *Cmc `json:"cmc"`
}

CmcResponse ...

type CoinData

type CoinData struct {
	Status Status `json:"status"`
	Data   Data   `json:"data"`
}

type Column

type Column struct {
	CommonTableCols
	ColumnID string `json:"columnID" gorm:"type:char(36); primary_key; not null"`
	Name     string `json:"name"`
	Order    int    `json:"order"`
}

type CommonHTTPResponse

type CommonHTTPResponse struct {
	ResultCode string `json:"resultCode"`
	ResultMsg  string `json:"resultMsg"`
	TrID       string `json:"trID"`
}

CommonHTTPResponse ...

func (*CommonHTTPResponse) SetResult

func (c *CommonHTTPResponse) SetResult(resultCode, resultMsg, trID string)

SetResult ...

type CommonTableCols

type CommonTableCols struct {
	Seq       uint `gorm:"type:int unsigned auto_increment;unique;not null"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time `sql:"index"`
}

CommonTableCols ...

type Conversion

type Conversion struct {
	From  string  `json:"from"`
	To    string  `json:"to"`
	Price float64 `json:"price"`
}

type ConversionResponse

type ConversionResponse struct {
	CommonHTTPResponse
	Conversion *Conversion `json:"conversion"`
}

ConversionResponse ...

type CountHTTPResponse

type CountHTTPResponse struct {
	CommonHTTPResponse
	Count uint `json:"count"`
}

CountHTTPResponse ...

type Data

type Data struct {
	Atom Atom `json:"ATOM"`
	Btc  Btc  `json:"BTC"`
	Eth  Eth  `json:"ETH"`
	Ltc  Ltc  `json:"LTC"`
	Xrp  Xrp  `json:"XRP"`
}

type Eth

type Eth struct {
	ID                int         `json:"id"`
	Name              string      `json:"name"`
	Symbol            string      `json:"symbol"`
	Slug              string      `json:"slug"`
	NumMarketPairs    int         `json:"num_market_pairs"`
	DateAdded         time.Time   `json:"date_added"`
	Tags              []string    `json:"tags"`
	MaxSupply         interface{} `json:"max_supply"`
	CirculatingSupply float64     `json:"circulating_supply"`
	TotalSupply       float64     `json:"total_supply"`
	IsActive          int         `json:"is_active"`
	Platform          interface{} `json:"platform"`
	CmcRank           int         `json:"cmc_rank"`
	IsFiat            int         `json:"is_fiat"`
	LastUpdated       time.Time   `json:"last_updated"`
	Quote             Quote       `json:"quote"`
}

type GetBySymbolHTTPRequest

type GetBySymbolHTTPRequest struct {
	Symbol   string `json:"symbol"`
	FromDate string `json:"from_date" form:"from_date" query:"from_date"`
	ToDate   string `json:"to_date" form:"to_date" query:"to_date"`
}

type GetCmcHTTPRequest

type GetCmcHTTPRequest struct {
	CmcID       string    `json:"cmcID" gorm:"type:char(36); unique; not null"`
	Symbol      string    `json:"symbol"`
	Price       float64   `json:"price"`
	LastUpdated time.Time `json:"last_updated"`
}

type HTTPResponse

type HTTPResponse interface {
	SetResult(resultCode, resultMsg, trID, jobType string)
}

HTTPResponse ...

type Ltc

type Ltc struct {
	ID                int         `json:"id"`
	Name              string      `json:"name"`
	Symbol            string      `json:"symbol"`
	Slug              string      `json:"slug"`
	NumMarketPairs    int         `json:"num_market_pairs"`
	DateAdded         time.Time   `json:"date_added"`
	Tags              []string    `json:"tags"`
	MaxSupply         int         `json:"max_supply"`
	CirculatingSupply float64     `json:"circulating_supply"`
	TotalSupply       int         `json:"total_supply"`
	IsActive          int         `json:"is_active"`
	Platform          interface{} `json:"platform"`
	CmcRank           int         `json:"cmc_rank"`
	IsFiat            int         `json:"is_fiat"`
	LastUpdated       time.Time   `json:"last_updated"`
	Quote             Quote       `json:"quote"`
}

type Quote

type Quote struct {
	Usd Usd `json:"USD"`
}

type Status

type Status struct {
	Timestamp    time.Time   `json:"timestamp"`
	ErrorCode    int         `json:"error_code"`
	ErrorMessage interface{} `json:"error_message"`
	Elapsed      int         `json:"elapsed"`
	CreditCount  int         `json:"credit_count"`
	Notice       interface{} `json:"notice"`
}

type TBackLogListResponse

type TBackLogListResponse struct {
	CommonHTTPResponse
	Logs []*cloudwatchlogs.OutputLogEvent `json:"logs"`
}

type Usd

type Usd struct {
	Price                 float64   `json:"price"`
	Volume24H             float64   `json:"volume_24h"`
	VolumeChange24H       float64   `json:"volume_change_24h"`
	PercentChange1H       float64   `json:"percent_change_1h"`
	PercentChange24H      float64   `json:"percent_change_24h"`
	PercentChange7D       float64   `json:"percent_change_7d"`
	PercentChange30D      float64   `json:"percent_change_30d"`
	PercentChange60D      float64   `json:"percent_change_60d"`
	PercentChange90D      float64   `json:"percent_change_90d"`
	MarketCap             float64   `json:"market_cap"`
	MarketCapDominance    float64   `json:"market_cap_dominance"`
	FullyDilutedMarketCap float64   `json:"fully_diluted_market_cap"`
	LastUpdated           time.Time `json:"last_updated"`
}

type Xrp

type Xrp struct {
	ID                int         `json:"id"`
	Name              string      `json:"name"`
	Symbol            string      `json:"symbol"`
	Slug              string      `json:"slug"`
	NumMarketPairs    int         `json:"num_market_pairs"`
	DateAdded         time.Time   `json:"date_added"`
	Tags              []string    `json:"tags"`
	MaxSupply         int64       `json:"max_supply"`
	CirculatingSupply int64       `json:"circulating_supply"`
	TotalSupply       int64       `json:"total_supply"`
	IsActive          int         `json:"is_active"`
	Platform          interface{} `json:"platform"`
	CmcRank           int         `json:"cmc_rank"`
	IsFiat            int         `json:"is_fiat"`
	LastUpdated       time.Time   `json:"last_updated"`
	Quote             Quote       `json:"quote"`
}

Jump to

Keyboard shortcuts

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