models

package
v0.0.0-...-4b127fe Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestBalances = []hestia.CoinBalances{
	{Ticker: "BTC", Balance: 0, Status: "SUCCESS"},
	{Ticker: "COLX", Balance: 0, Status: "SUCCESS"},
	{Ticker: "DASH", Balance: 0, Status: "SUCCESS"},
	{Ticker: "DGB", Balance: 0, Status: "SUCCESS"},
	{Ticker: "ETH", Balance: 0, Status: "SUCCESS"},
	{Ticker: "GRS", Balance: 0, Status: "SUCCESS"},
	{Ticker: "LTC", Balance: 0, Status: "SUCCESS"},
	{Ticker: "ONION", Balance: 0, Status: "SUCCESS"},
	{Ticker: "POLIS", Balance: 0, Status: "SUCCESS"},
	{Ticker: "TELOS", Balance: 0, Status: "SUCCESS"},
	{Ticker: "TUSD", Balance: 0, Status: "SUCCESS"},
	{Ticker: "USDC", Balance: 0, Status: "SUCCESS"},
	{Ticker: "USDT", Balance: 0, Status: "SUCCESS"},
	{Ticker: "XSG", Balance: 0, Status: "SUCCESS"},
	{Ticker: "XZC", Balance: 0, Status: "SUCCESS"},
}
View Source
var TestCard = hestia.Card{
	Address:    "TEST-ADDRRESS",
	CardCode:   "TEST-CARDCODE",
	CardNumber: "123456778",
	City:       "TEST-CITY",
	Email:      "TEST@TEST.COM",
	FirstName:  "TEST",
	LastName:   "CARD",
	UID:        "XYZ12345678910",
}
View Source
var TestCoinData = []hestia.Coin{hestia.Coin{Ticker: "AYA", Shift: hestia.Properties{FeePercentage: 10, Available: false}, Deposits: hestia.Properties{FeePercentage: 10, Available: false}, Vouchers: hestia.Properties{FeePercentage: 10, Available: false}, Orders: hestia.Properties{FeePercentage: 10, Available: false}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "BAT", Shift: hestia.Properties{FeePercentage: 10, Available: false}, Deposits: hestia.Properties{FeePercentage: 10, Available: false}, Vouchers: hestia.Properties{FeePercentage: 0, Available: false}, Orders: hestia.Properties{FeePercentage: 0, Available: false}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "BITG", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "BTC", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "COLX", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "DASH", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "DGB", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "DIVI", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "ETH", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "FYD", Shift: hestia.Properties{FeePercentage: 10, Available: false}, Deposits: hestia.Properties{FeePercentage: 10, Available: false}, Vouchers: hestia.Properties{FeePercentage: 10, Available: false}, Orders: hestia.Properties{FeePercentage: 10, Available: false}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "GRS", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "LINK", Shift: hestia.Properties{FeePercentage: 10, Available: false}, Deposits: hestia.Properties{FeePercentage: 10, Available: false}, Vouchers: hestia.Properties{FeePercentage: 0, Available: false}, Orders: hestia.Properties{FeePercentage: 10, Available: false}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "LMY", Shift: hestia.Properties{FeePercentage: 10, Available: false}, Deposits: hestia.Properties{FeePercentage: 10, Available: false}, Vouchers: hestia.Properties{FeePercentage: 10, Available: false}, Orders: hestia.Properties{FeePercentage: 10, Available: false}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "LTC", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "MANA", Shift: hestia.Properties{FeePercentage: 10, Available: false}, Deposits: hestia.Properties{FeePercentage: 10, Available: false}, Vouchers: hestia.Properties{FeePercentage: 10, Available: false}, Orders: hestia.Properties{FeePercentage: 10, Available: false}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "MW", Shift: hestia.Properties{FeePercentage: 10, Available: false}, Deposits: hestia.Properties{FeePercentage: 10, Available: false}, Vouchers: hestia.Properties{FeePercentage: 10, Available: false}, Orders: hestia.Properties{FeePercentage: 10, Available: false}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "ONION", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "POLIS", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "RPD", Shift: hestia.Properties{FeePercentage: 10, Available: false}, Deposits: hestia.Properties{FeePercentage: 10, Available: false}, Vouchers: hestia.Properties{FeePercentage: 10, Available: false}, Orders: hestia.Properties{FeePercentage: 10, Available: false}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "TELOS", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "TUSD", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "USDC", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "USDT", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "XSG", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}, hestia.Coin{Ticker: "XZC", Shift: hestia.Properties{FeePercentage: 10, Available: true}, Deposits: hestia.Properties{FeePercentage: 10, Available: true}, Vouchers: hestia.Properties{FeePercentage: 10, Available: true}, Orders: hestia.Properties{FeePercentage: 10, Available: true}, Balances: hestia.BalanceLimits{HotWallet: 0, Exchanges: 0}, Adrestia: hestia.AdrestiaInfo{Available: false, CoinUsage: 0}}}
View Source
var TestConfigData = hestia.Config{
	Shift:    hestia.Available{Service: true, Processor: true},
	Deposits: hestia.Available{Service: true, Processor: true},
	Orders:   hestia.Available{Service: true, Processor: true},
	Vouchers: hestia.Available{Service: true, Processor: true},
}
View Source
var TestDeposit = hestia.Deposit{
	ID:  "TEST-DEPOSIT",
	UID: "XYZ12345678910",
	Payment: hestia.Payment{
		Address:       "FAKE-ADDR",
		Amount:        123123,
		Coin:          "POLIS",
		Txid:          "FAKE-TXID",
		Confirmations: 123,
	},
	FeePayment:   TestFeePayment,
	AmountInPeso: "100",
	CardCode:     "TEST-CARDCODE",
	Status:       "COMPLETED",
	Timestamp:    "000000000000",
}
View Source
var TestFeePayment = hestia.Payment{
	Address:       "TEST-ADDR",
	Amount:        0,
	Coin:          "polis",
	Txid:          "TEST-TXID",
	Confirmations: 0,
}
View Source
var TestOrder = hestia.Order{
	ID:     "TEST-ORDER",
	UID:    "XYZ12345678910",
	Status: "COMPLETED",
	PaymentInfo: hestia.Payment{
		Address: "FAKE-ADDRRESS",
		Amount:  100,
		Coin:    "POLIS",
		Txid:    "FAKE-TXID",

		Confirmations: 0,
	},
	FeePayment: TestFeePayment,
	AddressInfo: hestia.AddressInformation{
		City:       "FAKE-CITY",
		Country:    "FAKE-COUNTRY",
		PostalCode: "00000",
		Email:      "TEST@TEST.COM",
		Street:     "FAKE-STREET",
	},
	Delivery: hestia.DeliveryOption{
		Type:    "DHL",
		Service: "EXPRESS",
		DeliveryAddress: hestia.AddressInformation{
			City:       "FAKE-CITY",
			Country:    "FAKE-COUNTRY",
			PostalCode: "00000",
			Email:      "TEST@TEST.COM",
			Street:     "FAKE-STREET",
		},
	},
	PersonalizationData: hestia.PersonalizationInformation{
		PersonalData: hestia.PersonalInformation{
			BirthDate:   "20190211",
			CivilState:  "MARRIED",
			FirstName:   "TEST-USER",
			LastName:    "TEST-USER",
			Sex:         "MALE",
			HomeNumber:  "00-00-00-00",
			Nationality: "MEXICAN",
			PassportID:  "1234567890",
		},
		AddressData: hestia.AddressInformation{
			City:       "FAKE-CITY",
			Country:    "FAKE-COUNTRY",
			PostalCode: "00000",
			Email:      "TEST@TEST.COM",
			Street:     "FAKE-STREET",
		},
	},
}
View Source
var TestShift = hestia.Shift{
	ID:        "TEST-SHIFT",
	Status:    hestia.GetShiftStatusString(hestia.ShiftStatusComplete),
	Timestamp: time.Unix(10000000, 0).Unix(),
	UID:       "XYZ12345678910",
	Payment: hestia.Payment{
		Address:       "FAKE-ADDR",
		Amount:        0123123,
		Coin:          "POLIS",
		Txid:          "FAKE-TXID",
		Confirmations: 0,
	},
	FeePayment:     TestFeePayment,
	ToCoin:         "Fake_coIN",
	RefundAddr:     "FAKE_ADDR",
	ToAmount:       1000,
	ProofTimestamp: time.Unix(10000000, 0).Unix(),
	PaymentProof:   "fakeTxid",
	ToAddress:      "FakeAddress",
}
View Source
var TestUser = hestia.User{
	ID:       "XYZ12345678910",
	Email:    "TEST@TEST.COM",
	KYCData:  hestia.KYCInformation{},
	Role:     "admin",
	Shifts:   []string{},
	Vouchers: []string{},
	Deposits: []string{},
	Cards:    []string{},
	Orders:   []string{},
}
View Source
var TestVoucher = hestia.Voucher{
	ID:         "TEST-VOUCHER",
	UID:        "XYZ12345678910",
	VoucherID:  123123,
	VariantID:  "FAKE-VARIANT",
	Name:       "TEST-VOUCHER",
	FeePayment: TestFeePayment,
	PaymentData: hestia.Payment{
		Address:       "FAKE-ADDR",
		Amount:        123123,
		Coin:          "POLIS",
		Txid:          "FAKE-TXID",
		Confirmations: 123,
	},
	BitcouPaymentData: hestia.Payment{
		Address:       "FAKE-ADDR",
		Amount:        123123,
		Coin:          "POLIS",
		Txid:          "FAKE-TXID",
		Confirmations: 123,
	},
	BitcouFeePaymentData: hestia.Payment{
		Address:       "TEST_ADDR",
		Amount:        123,
		Coin:          "POLIS",
		Txid:          "Fakse_TXID",
		Confirmations: 0,
	},
	RefundAddr:      "FAKE_ADDR",
	BitcouID:        "FAKE-ID",
	RedeemCode:      "FAKE-REDEEM",
	Status:          hestia.GetVoucherStatusString(hestia.VoucherStatusComplete),
	Timestamp:       time.Unix(0, 0).Unix(),
	RedeemTimestamp: time.Unix(0, 0).Unix(),
}

Functions

This section is empty.

Types

type AdrestiaModel

type AdrestiaModel struct {
	Firestore   *firestore.DocumentRef
	Collections map[string]string
}

func NewAdrestiaModel

func NewAdrestiaModel(doc firestore.DocumentRef) AdrestiaModel

func (*AdrestiaModel) GetAllBalancer

func (am *AdrestiaModel) GetAllBalancer(includeComplete bool, sinceTimestamp int) (balancers []hestia.Balancer, err error)

func (*AdrestiaModel) GetAllBalancerOrder

func (am *AdrestiaModel) GetAllBalancerOrder(includeComplete bool, sinceTimestamp int) (orders []hestia.BalancerOrder, err error)

func (*AdrestiaModel) GetAllSimpleTx

func (am *AdrestiaModel) GetAllSimpleTx(includeComplete bool, sinceTimestamp int, txType string, balancerId string) (simpleTxs []hestia.SimpleTx, err error)

func (*AdrestiaModel) GetBalancer

func (am *AdrestiaModel) GetBalancer(id string) (balancer hestia.Balancer, err error)

func (*AdrestiaModel) GetBalancerOrder

func (am *AdrestiaModel) GetBalancerOrder(id string) (order hestia.BalancerOrder, err error)

func (*AdrestiaModel) GetBalancers

func (am *AdrestiaModel) GetBalancers(includeComplete bool) (balancers []hestia.Balancer, err error)

func (*AdrestiaModel) GetSimpleTx

func (am *AdrestiaModel) GetSimpleTx(id string, txType string) (simpleTx hestia.SimpleTx, err error)

func (*AdrestiaModel) UpdateBalancer

func (am *AdrestiaModel) UpdateBalancer(balancer hestia.Balancer) error

func (*AdrestiaModel) UpdateBalancerOrder

func (am *AdrestiaModel) UpdateBalancerOrder(order hestia.BalancerOrder) error

func (*AdrestiaModel) UpdateSimpleTx

func (am *AdrestiaModel) UpdateSimpleTx(simpleTx hestia.SimpleTx, txType string) error

type ApiBitcouFilter

type ApiBitcouFilter struct {
	Target    string   `json:"api"`
	Vouchers  []string `json:"vouchers"`
	Providers []int    `json:"providers"`
}

type BalancesModel

type BalancesModel struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*BalancesModel) AddBalance

func (m *BalancesModel) AddBalance(balance hestia.CoinBalances) error

func (*BalancesModel) GetBalances

func (m *BalancesModel) GetBalances() ([]hestia.CoinBalances, error)

func (*BalancesModel) UpdateBalances

func (m *BalancesModel) UpdateBalances(Balances []hestia.CoinBalances) error

type BitcouConfModel

type BitcouConfModel struct {
	Firestore *firestore.CollectionRef
}

func (*BitcouConfModel) UpdateFilters

func (bcm *BitcouConfModel) UpdateFilters(filter BitcouFilter) error

type BitcouCountry

type BitcouCountry struct {
	ID       string                `firestore:"id" json:"id"`
	Vouchers []bitcou.LightVoucher `firestore:"vouchers" json:"vouchers"`
}

type BitcouCountryV2

type BitcouCountryV2 struct {
	ID       string                  `firestore:"id" json:"id"`
	Vouchers []bitcou.LightVoucherV2 `firestore:"vouchers" json:"vouchers"`
}

type BitcouFilter

type BitcouFilter struct {
	ID        string   `firestore:"id" json:"id"`
	Providers []int    `firestore:"providers" json:"providers"`
	Vouchers  []string `firestore:"vouchers" json:"vouchers"`
}

type BitcouFilterWrapper

type BitcouFilterWrapper struct {
	ProviderFilter map[int]bool
	VoucherFilter  map[string]bool
}

type BitcouModel

type BitcouModel struct {
	Firestore       *firestore.CollectionRef
	FirestoreTest   *firestore.CollectionRef
	FirestoreV2     *firestore.CollectionRef
	FirestoreTestV2 *firestore.CollectionRef
	ProductImages   *firestore.CollectionRef
}

func (*BitcouModel) AddCountry

func (bm *BitcouModel) AddCountry(country BitcouCountry) error

func (*BitcouModel) AddCountryV2

func (bm *BitcouModel) AddCountryV2(country BitcouCountryV2) error

func (*BitcouModel) AddProviderImage

func (bm *BitcouModel) AddProviderImage(imageInfo ladon.ProviderImageApp) error

func (*BitcouModel) AddTestCountry

func (bm *BitcouModel) AddTestCountry(country BitcouCountry) error

func (*BitcouModel) AddTestCountryV2

func (bm *BitcouModel) AddTestCountryV2(country BitcouCountryV2) error

func (*BitcouModel) GetCountries

func (bm *BitcouModel) GetCountries(dev bool) (countries []string, err error)

Replaces both implementations of GetCountry

func (*BitcouModel) GetCountriesV2

func (bm *BitcouModel) GetCountriesV2(dev bool) (countries []string, err error)

Replaces both implementations of GetCountry

func (*BitcouModel) GetCountry

func (bm *BitcouModel) GetCountry(id string) (country BitcouCountry, err error)

func (*BitcouModel) GetCountryV2

func (bm *BitcouModel) GetCountryV2(id string) (country BitcouCountryV2, err error)

func (*BitcouModel) GetFilters

func (bm *BitcouModel) GetFilters(db string) (filterResponse BitcouFilterWrapper, err error)

func (*BitcouModel) GetProviderImage

func (bm *BitcouModel) GetProviderImage(providerId string) (imageInfo ladon.ProviderImageApp, err error)

func (*BitcouModel) GetTestCountry

func (bm *BitcouModel) GetTestCountry(id string) (country BitcouCountry, err error)

func (*BitcouModel) GetTestCountryV2

func (bm *BitcouModel) GetTestCountryV2(id string) (country BitcouCountryV2, err error)

type CardsModel

type CardsModel struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*CardsModel) Get

func (m *CardsModel) Get(id string) (card hestia.Card, err error)

func (*CardsModel) GetAll

func (m *CardsModel) GetAll() (cards []hestia.Card, err error)

func (*CardsModel) Update

func (m *CardsModel) Update(card hestia.Card) error

type CoinsModel

type CoinsModel struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*CoinsModel) AddCoin

func (m *CoinsModel) AddCoin(Coin hestia.Coin) error

func (*CoinsModel) GetCoinsData

func (m *CoinsModel) GetCoinsData() ([]hestia.Coin, error)

func (*CoinsModel) UpdateCoinsData

func (m *CoinsModel) UpdateCoinsData(Coins []hestia.Coin) error

type DepositsModel

type DepositsModel struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*DepositsModel) Get

func (m *DepositsModel) Get(id string) (deposit hestia.Deposit, err error)

func (*DepositsModel) GetAll

func (m *DepositsModel) GetAll(filter string) (deposits []hestia.Deposit, err error)

func (*DepositsModel) Update

func (m *DepositsModel) Update(deposit hestia.Deposit) error

type ExchangesModel

type ExchangesModel struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*ExchangesModel) Get

func (m *ExchangesModel) Get(id string) (exchange hestia.ExchangeInfo, err error)

func (*ExchangesModel) GetAll

func (m *ExchangesModel) GetAll() (exchanges []hestia.ExchangeInfo, err error)

func (*ExchangesModel) Update

func (m *ExchangesModel) Update(exchange hestia.ExchangeInfo) error

type GlobalConfigModel

type GlobalConfigModel struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*GlobalConfigModel) GetConfigData

func (m *GlobalConfigModel) GetConfigData() (hestia.Config, error)

func (*GlobalConfigModel) UpdateConfigData

func (m *GlobalConfigModel) UpdateConfigData(config hestia.Config) error

type OrdersModel

type OrdersModel struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*OrdersModel) Get

func (m *OrdersModel) Get(id string) (order hestia.Order, err error)

func (*OrdersModel) GetAll

func (m *OrdersModel) GetAll(filter string) (orders []hestia.Order, err error)

func (*OrdersModel) Update

func (m *OrdersModel) Update(order hestia.Order) error

type ShiftModel

type ShiftModel struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*ShiftModel) Get

func (m *ShiftModel) Get(id string) (shift hestia.Shift, err error)

func (*ShiftModel) GetAll

func (m *ShiftModel) GetAll(filter string, timefilter string) (shifts []hestia.Shift, err error)

func (*ShiftModel) Update

func (m *ShiftModel) Update(shift hestia.Shift) error

type ShiftModelV2

type ShiftModelV2 struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*ShiftModelV2) Get

func (m *ShiftModelV2) Get(id string) (shift hestia.ShiftV2, err error)

func (*ShiftModelV2) GetAll

func (m *ShiftModelV2) GetAll(filter int32, timeFilter string) (shifts []hestia.ShiftV2, err error)

func (*ShiftModelV2) GetOpenShifts

func (m *ShiftModelV2) GetOpenShifts(timestamp int64) (shifts []hestia.ShiftV2, err error)

func (*ShiftModelV2) Update

func (m *ShiftModelV2) Update(shift hestia.ShiftV2) error

type ShiftStatsResponse

type ShiftStatsResponse struct {
	Pending    int `json:"pending"`
	Confirming int `json:"confirming"`
	Confirmed  int `json:"confirmed"`
	Error      int `json:"error"`
	Refund     int `json:"refund"`
	Refunded   int `json:"refunded"`
	Complete   int `json:"complete"`
	Total      int `json:"total"`
}

type UsersModel

type UsersModel struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*UsersModel) AddCard

func (m *UsersModel) AddCard(uid string, cardCode string) error

AddCard will add a card code into the user cards array.

func (*UsersModel) AddDeposit

func (m *UsersModel) AddDeposit(uid string, depositID string) error

AddDeposit will add a deposit id into the user deposits array.

func (*UsersModel) AddOrder

func (m *UsersModel) AddOrder(uid string, orderID string) error

AddOrder will add a order id into the user orders array.

func (*UsersModel) AddShift

func (m *UsersModel) AddShift(uid string, shiftID string) error

AddShift will add a shift id into the user shifts array.

func (*UsersModel) AddShiftV2

func (m *UsersModel) AddShiftV2(uid string, shiftID string) error

AddShift will add a shift id into the user shifts array.

func (*UsersModel) AddVoucher

func (m *UsersModel) AddVoucher(uid string, voucherID string) error

AddVoucher will add a voucher id into the user vouchers array.

func (*UsersModel) AddVoucherV2

func (m *UsersModel) AddVoucherV2(uid string, voucherId string) error

AddVoucher will add a voucher id into the user vouchers array.

func (*UsersModel) Get

func (m *UsersModel) Get(uid string) (user hestia.User, err error)

Get will return the user information stored on MongoDB

func (*UsersModel) GetAll

func (m *UsersModel) GetAll() (users []hestia.User, err error)

func (*UsersModel) Update

func (m *UsersModel) Update(user hestia.User) error

Update will update the user information on the MongoDB

type VoucherStatsResponse

type VoucherStatsResponse struct {
	Pending           int `json:"pending"`
	Confirmed         int `json:"confirmed"`
	Confirming        int `json:"confirming"`
	AwaitingProvider  int `json:"awaiting_provider"`
	Error             int `json:"error"`
	Complete          int `json:"complete"`
	RefundTotal       int `json:"refund_total"`
	RefundFee         int `json:"refund_fee"`
	Refunded          int `json:"refunded"`
	RefundedPartially int `json:"refunded_partially"`
	Total             int `json:"total"`
}

type VouchersModel

type VouchersModel struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*VouchersModel) Get

func (m *VouchersModel) Get(id string) (voucher hestia.Voucher, err error)

func (*VouchersModel) GetAll

func (m *VouchersModel) GetAll(filter string, timefilter string) (vouchers []hestia.Voucher, err error)

func (*VouchersModel) Update

func (m *VouchersModel) Update(voucher hestia.Voucher) error

type VouchersModelV2

type VouchersModelV2 struct {
	Firestore  *firestore.DocumentRef
	Collection string
}

func (*VouchersModelV2) Get

func (m *VouchersModelV2) Get(id string) (voucher hestia.VoucherV2, err error)

func (*VouchersModelV2) GetAll

func (m *VouchersModelV2) GetAll(filter int, timefilter string) (vouchers []hestia.VoucherV2, err error)

func (*VouchersModelV2) GetWithComposedQuery

func (m *VouchersModelV2) GetWithComposedQuery(filters herodotus.VoucherV2Filters) (vouchers []hestia.VoucherV2, err error)

func (*VouchersModelV2) Update

func (m *VouchersModelV2) Update(voucher hestia.VoucherV2) error

Jump to

Keyboard shortcuts

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