Add confirmation struct
This commit is contained in:
parent
163e3244f9
commit
d3c17fe482
@ -13,3 +13,8 @@ CREATE UNIQUE INDEX product_trade_id_index ON trades (
|
|||||||
trade_id);
|
trade_id);
|
||||||
|
|
||||||
CREATE INDEX timestamp_index ON trades (timestamp);
|
CREATE INDEX timestamp_index ON trades (timestamp);
|
||||||
|
|
||||||
|
CREATE TABLE confirmations (
|
||||||
|
id SERIAL PRIMARY KEY,
|
||||||
|
product CHAR(7) NOT NULL,
|
||||||
|
last_trade_id INTEGER NOT NULL DEFAULT 0);
|
||||||
|
13
confirmation.go
Normal file
13
confirmation.go
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package tacitus
|
||||||
|
|
||||||
|
type Confirmation struct {
|
||||||
|
Id int `json:"id"`
|
||||||
|
Product string `json:"product"`
|
||||||
|
LastTradeId int `json:"last_trade_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type ConfirmationService interface {
|
||||||
|
Confirmation(product string) (*Confirmation, error)
|
||||||
|
CreateConfirmation(c *Confirmation) error
|
||||||
|
UpdateConfirmation(c *Confirmation) error
|
||||||
|
}
|
Reference in New Issue
Block a user