Documentation ¶
Index ¶
- type Auth
- type AuthDB
- type Converter
- func (c *Converter) GetAvailableConverterPairs(ctx context.Context) ([]core.ConverterPair, error)
- func (c *Converter) GetCurrentExchange(ctx context.Context, converterPair core.ConverterPair) (core.Exchange, error)
- func (c *Converter) GetMyConvertPairs(ctx context.Context) ([]core.ConverterPair, error)
- func (c *Converter) GetMyThresholdsConvertPairs(ctx context.Context) ([]core.ThresholdConvertPair, error)
- func (c *Converter) SetConvertPair(ctx context.Context, converterPair core.ConverterPair) error
- func (c *Converter) SetThresholdConvertPair(ctx context.Context, threshold core.ThresholdConvertPair) error
- type ConverterBinanceApi
- type ConverterUserDb
- type Currency
- func (c Currency) DeleteCurrency(ctx context.Context, currency core.CurrencyCode) error
- func (c Currency) GetAvailableBankByCurrency(ctx context.Context, currencyCode core.CurrencyCode) (banks []core.CurrencyBank, err error)
- func (c Currency) GetAvailableCurrencies(ctx context.Context, currencyType core.CurrencyType) (currencies []core.CurrencyCode, err error)
- func (c Currency) GetMyCurrencies(ctx context.Context, currencyType *core.CurrencyType) ([]core.FullCurrency, error)
- func (c Currency) SetCurrency(ctx context.Context, currency core.FullCurrency) error
- type CurrencyUserDb
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) SignUpUserByTelegram ¶
type Converter ¶
type Converter struct { UserDb ConverterUserDb // contains filtered or unexported fields }
func NewConverter ¶
func NewConverter(binanceApi ConverterBinanceApi, userDb ConverterUserDb) *Converter
func (*Converter) GetAvailableConverterPairs ¶
func (*Converter) GetCurrentExchange ¶
func (*Converter) GetMyConvertPairs ¶
func (*Converter) GetMyThresholdsConvertPairs ¶
func (*Converter) SetConvertPair ¶
func (*Converter) SetThresholdConvertPair ¶
type ConverterBinanceApi ¶
type ConverterUserDb ¶
type ConverterUserDb interface { SetUserConverterPair(ctx context.Context, userId int, converterPair core.ConverterPair) ( int, error) GetUserConverterPairs(ctx context.Context, userId int) ([]core.ConverterPair, error) GetConverterPairs(ctx context.Context) ([]core.ConverterPair, error) SetThresholdConvertPair(ctx context.Context, userId int, threshold core.ThresholdConvertPair) error GetThresholdConvertPair(ctx context.Context, userId int) ([]core.ThresholdConvertPair, error) }
type Currency ¶
type Currency struct {
// contains filtered or unexported fields
}
func NewCurrency ¶
func NewCurrency(userDb CurrencyUserDb) *Currency
func (Currency) DeleteCurrency ¶
func (Currency) GetAvailableBankByCurrency ¶
func (c Currency) GetAvailableBankByCurrency(ctx context.Context, currencyCode core.CurrencyCode) (banks []core.CurrencyBank, err error)
func (Currency) GetAvailableCurrencies ¶
func (c Currency) GetAvailableCurrencies(ctx context.Context, currencyType core.CurrencyType) (currencies []core.CurrencyCode, err error)
func (Currency) GetMyCurrencies ¶
func (c Currency) GetMyCurrencies(ctx context.Context, currencyType *core.CurrencyType) ([]core.FullCurrency, error)
func (Currency) SetCurrency ¶
type CurrencyUserDb ¶
type CurrencyUserDb interface { AddUserCurrency(ctx context.Context, userId int, currency core.FullCurrency) (int, error) GetUserCurrencies(ctx context.Context, userId int, currencyType *core.CurrencyType) ([]core. FullCurrency, error) DeleteUserCurrency(ctx context.Context, userId int, currency core.CurrencyCode) error GetAvailableClassicCurrencies(ctx context.Context) ([]core.CurrencyCode, error) GetAvailableBanks(ctx context.Context, currency core.CurrencyCode) ([]core.CurrencyBank, error) GetAvailableCryptoCurrencies(ctx context.Context) ([]core.CurrencyCode, error) }
Click to show internal directories.
Click to hide internal directories.