ingest

package
v0.0.0-...-b400eb5 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FeeHandler

func FeeHandler(publisher channels.Publisher, accounts accountsModule.AccountService, affiliates affiliatesModule.AffiliateService, defaultFeeRecipient [20]byte, exchangeLookup ExchangeLookup) func(http.ResponseWriter, *http.Request, *poolModule.Pool)

func Handler

func Handler(publisher channels.Publisher, accounts accountsModule.AccountService, affiliates affiliatesModule.AffiliateService, enforceTerms bool, tm TermsManager, exchangeLookup ExchangeLookup) func(http.ResponseWriter, *http.Request, *poolModule.Pool)

func HealthCheckHandler

func HealthCheckHandler(redisClient *redis.Client) func(http.ResponseWriter, *http.Request)

Types

type ExchangeLookup

type ExchangeLookup interface {
	ExchangeIsKnown(*types.Address) <-chan uint
}

type FeeInputPayload

type FeeInputPayload struct {
	Maker        string `json:"maker"`
	Exchange     string `json:"exchangeAddress"`
	FeeRecipient string `json:"feeRecipientAddress"`
	Taker        string `json:"taker"`
	Sender       string `json:"senderAddress"`
}

FeeInputPayload only considers maker and feeRecipient when calculating fees. Everything else will be ignored.

type FeeResponse

type FeeResponse struct {
	MakerFee       string `json:"makerFee"`
	TakerFee       string `json:"takerFee"`
	FeeRecipient   string `json:"feeRecipientAddress"`
	Sender         string `json:"senderAddress"`
	TakerToSpecify string `json:"takerToSpecify"`
}

type HealthCheck

type HealthCheck struct {
	Time []string
}

type IngestError

type IngestError struct {
	Code             int               `json:"code"`
	Reason           string            `json:"reason"`
	ValidationErrors []ValidationError `json:"validationErrors,omitempty"`
}

type TermsManager

type TermsManager interface {
	CheckAddress(*types.Address) <-chan bool
}

type ValidationError

type ValidationError struct {
	Field  string `json:"field"`
	Code   int    `json:"code"`
	Reason string `json:"reason"`
}

Jump to

Keyboard shortcuts

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