Documentation
¶
Index ¶
- Variables
- type Asset
- type AssetService
- type AssetStore
- type FeedConfig
- type Feeder
- type FeederStore
- type MarketStore
- type Member
- type PriceData
- type PriceProposal
- type RawTransaction
- type System
- func (s *System) Me() *Member
- func (s *System) Member(id int64) *Member
- func (s *System) MemberIDs() []string
- func (s *System) MergeProposals(p0, p1 *PriceProposal) *PriceProposal
- func (s *System) SignProposal(p *PriceProposal) *PriceProposal
- func (s *System) VerifyData(p *PriceData) bool
- func (s *System) VerifyProposal(p *PriceProposal) bool
- type Ticker
- type Transfer
- type WalletStore
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAssetNotExist = errors.New("asset not exist")
)
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { ID string `sql:"size:36;PRIMARY_KEY" json:"id,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` Name string `sql:"size:64" json:"name,omitempty"` Symbol string `sql:"size:32" json:"symbol,omitempty"` DisplaySymbol string `sql:"size:32" json:"display_symbol,omitempty"` Logo string `sql:"size:256" json:"logo,omitempty"` ChainID string `sql:"size:36" json:"chain_id,omitempty"` Price decimal.Decimal `sql:"type:decimal(24,8)" json:"price_usd,omitempty"` }
type AssetService ¶
type AssetService interface { Find(ctx context.Context, id string) (*Asset, error) ListAll(ctx context.Context) ([]*Asset, error) }
AssetService provides access to assets information in the remote system like mixin network.
type AssetStore ¶
type AssetStore interface { Save(ctx context.Context, asset *Asset, columns ...string) error Find(ctx context.Context, id string) (*Asset, error) ListAll(ctx context.Context) ([]*Asset, error) ListPrices(ctx context.Context, ids ...string) (number.Values, error) }
AssetStore defines operations for working with assets on db.
type FeedConfig ¶
type FeederStore ¶
type MarketStore ¶
type Member ¶
type Member struct { ID int64 `json:"id"` ClientID string `json:"client_id"` Name string `json:"name"` VerifyKey *blst.PublicKey `json:"verify_key"` }
func (*Member) VerifyProposal ¶
type PriceData ¶
type PriceProposal ¶
type RawTransaction ¶
type System ¶
type System struct { Admins []string ConversationID string ClientID string Members []*Member Threshold uint8 SignKey *blst.PrivateKey Version string }
System stores system information.
func (*System) MergeProposals ¶
func (s *System) MergeProposals(p0, p1 *PriceProposal) *PriceProposal
func (*System) SignProposal ¶
func (s *System) SignProposal(p *PriceProposal) *PriceProposal
func (*System) VerifyData ¶
func (*System) VerifyProposal ¶
func (s *System) VerifyProposal(p *PriceProposal) bool
type Transfer ¶
type Transfer struct { ID int64 `sql:"PRIMARY_KEY" json:"id,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` TraceID string `sql:"type:char(36)" json:"trace_id,omitempty"` AssetID string `sql:"type:char(36)" json:"asset_id,omitempty"` Amount decimal.Decimal `sql:"type:decimal(64,8)" json:"amount,omitempty"` Memo string `sql:"size:200" json:"memo,omitempty"` Handled types.BitBool `sql:"type:bit(1)" json:"handled,omitempty"` Passed types.BitBool `sql:"type:bit(1)" json:"passed,omitempty"` Threshold uint8 `json:"threshold,omitempty"` Opponents pq.StringArray `sql:"type:varchar(1024)" json:"opponents,omitempty"` }
Click to show internal directories.
Click to hide internal directories.