controllers

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: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdrestiaController

type AdrestiaController struct {
	Model *models.AdrestiaModel
}

func (*AdrestiaController) GetBalancerOrders

func (ac *AdrestiaController) GetBalancerOrders(c *gin.Context)

func (*AdrestiaController) GetBalancers

func (ac *AdrestiaController) GetBalancers(c *gin.Context)

func (*AdrestiaController) GetDeposits

func (ac *AdrestiaController) GetDeposits(c *gin.Context)

func (*AdrestiaController) GetWithdrawals

func (ac *AdrestiaController) GetWithdrawals(c *gin.Context)

func (*AdrestiaController) StoreBalancer

func (ac *AdrestiaController) StoreBalancer(c *gin.Context)

func (*AdrestiaController) StoreBalancerOrder

func (ac *AdrestiaController) StoreBalancerOrder(c *gin.Context)

func (*AdrestiaController) StoreDeposit

func (ac *AdrestiaController) StoreDeposit(c *gin.Context)

func (*AdrestiaController) StoreWithdrawal

func (ac *AdrestiaController) StoreWithdrawal(c *gin.Context)

func (*AdrestiaController) UpdateBalancer

func (ac *AdrestiaController) UpdateBalancer(c *gin.Context)

func (*AdrestiaController) UpdateBalancerOrder

func (ac *AdrestiaController) UpdateBalancerOrder(c *gin.Context)

func (*AdrestiaController) UpdateDeposit

func (ac *AdrestiaController) UpdateDeposit(c *gin.Context)

func (*AdrestiaController) UpdateWithdrawal

func (ac *AdrestiaController) UpdateWithdrawal(c *gin.Context)

type CachedVouchersData

type CachedVouchersData struct {
	LastUpdated int64
	Vouchers    []bitcou.LightVoucher
}

type CachedVouchersDataV2

type CachedVouchersDataV2 struct {
	LastUpdated int64
	Vouchers    []bitcou.LightVoucherV2
}

type CardsController

type CardsController struct {
	Model     *models.CardsModel
	UserModel *models.UsersModel
}

func (*CardsController) GetAll

func (cc *CardsController) GetAll(userData hestia.User, params Params) (interface{}, error)

func (*CardsController) GetSingle

func (cc *CardsController) GetSingle(userData hestia.User, params Params) (interface{}, error)

func (*CardsController) Store

func (cc *CardsController) Store(c *gin.Context)

type CoinsController

type CoinsController struct {
	Model         *models.CoinsModel
	BalancesModel *models.BalancesModel
}

func (*CoinsController) GetCoinBalances

func (cc *CoinsController) GetCoinBalances(userData hestia.User, params Params) (interface{}, error)

func (*CoinsController) GetCoinsAvailability

func (cc *CoinsController) GetCoinsAvailability(userData hestia.User, params Params) (interface{}, error)

func (*CoinsController) GetCoinsAvailabilityMicroService

func (cc *CoinsController) GetCoinsAvailabilityMicroService(c *gin.Context)

func (*CoinsController) UpdateCoinsAvailability

func (cc *CoinsController) UpdateCoinsAvailability(userData hestia.User, params Params) (interface{}, error)

type DepositsController

type DepositsController struct {
	Model     *models.DepositsModel
	UserModel *models.UsersModel
}

func (*DepositsController) GetAll

func (dc *DepositsController) GetAll(userData hestia.User, params Params) (interface{}, error)

func (*DepositsController) GetSingle

func (dc *DepositsController) GetSingle(userData hestia.User, params Params) (interface{}, error)

func (*DepositsController) Store

func (dc *DepositsController) Store(c *gin.Context)

type ExchangesController

type ExchangesController struct {
	Model *models.ExchangesModel
}

func (*ExchangesController) GetExchange

func (ec *ExchangesController) GetExchange(c *gin.Context)

func (*ExchangesController) GetExchanges

func (ec *ExchangesController) GetExchanges(c *gin.Context)

func (*ExchangesController) UpdateExchange

func (ec *ExchangesController) UpdateExchange(c *gin.Context)

type FirebaseController

type FirebaseController struct {
	App        *firebase.App
	UsersModel *models.UsersModel
}

func (*FirebaseController) CheckAuth

func (fb *FirebaseController) CheckAuth(c *gin.Context, method func(userData hestia.User, params Params) (res interface{}, err error), admin bool)

func (*FirebaseController) CheckToken

func (fb *FirebaseController) CheckToken(c *gin.Context)

type GlobalConfigController

type GlobalConfigController struct {
	Model *models.GlobalConfigModel
}

func (*GlobalConfigController) GetConfig

func (gc *GlobalConfigController) GetConfig(userData hestia.User, params Params) (interface{}, error)

func (*GlobalConfigController) GetConfigMicroservice

func (gc *GlobalConfigController) GetConfigMicroservice(c *gin.Context)

func (*GlobalConfigController) GetEthGasPrice

func (gc *GlobalConfigController) GetEthGasPrice(c *gin.Context)

func (*GlobalConfigController) GetMaxAmountNoKYC

func (gc *GlobalConfigController) GetMaxAmountNoKYC(c *gin.Context)

func (*GlobalConfigController) GetPolisRelayFee

func (gc *GlobalConfigController) GetPolisRelayFee(c *gin.Context)

func (*GlobalConfigController) UpdateConfig

func (gc *GlobalConfigController) UpdateConfig(c *gin.Context)

func (*GlobalConfigController) UpdateConfigData

func (gc *GlobalConfigController) UpdateConfigData(userData hestia.User, params Params) (interface{}, error)

type OrdersController

type OrdersController struct {
	Model     *models.OrdersModel
	UserModel *models.UsersModel
}

func (*OrdersController) GetAll

func (oc *OrdersController) GetAll(userData hestia.User, params Params) (interface{}, error)

func (*OrdersController) GetSingle

func (oc *OrdersController) GetSingle(userData hestia.User, params Params) (interface{}, error)

func (*OrdersController) Store

func (oc *OrdersController) Store(c *gin.Context)

type Params

type Params struct {
	Admin      bool
	Filter     string
	ShiftID    string
	OrderID    string
	UserID     string
	VoucherID  string
	DepositID  string
	CardCode   string
	Body       []byte
	Timestamp  string
	Country    string
	Category   string
	ProviderId string
}

type ShiftsController

type ShiftsController struct {
	Model     *models.ShiftModel
	UserModel *models.UsersModel
}

func (*ShiftsController) GetAll

func (sc *ShiftsController) GetAll(userData hestia.User, params Params) (interface{}, error)

func (*ShiftsController) GetAllTyche

func (sc *ShiftsController) GetAllTyche(c *gin.Context)

func (*ShiftsController) GetSingle

func (sc *ShiftsController) GetSingle(userData hestia.User, params Params) (interface{}, error)

func (*ShiftsController) GetSingleTyche

func (sc *ShiftsController) GetSingleTyche(c *gin.Context)

func (*ShiftsController) Store

func (sc *ShiftsController) Store(c *gin.Context)

type ShiftsControllerV2

type ShiftsControllerV2 struct {
	Model       *models.ShiftModelV2
	LegacyModel *models.ShiftModel
	UserModel   *models.UsersModel
}

func (*ShiftsControllerV2) GetAll

func (sc *ShiftsControllerV2) GetAll(userData hestia.User, params Params) (interface{}, error)

func (*ShiftsControllerV2) GetAllTyche

func (sc *ShiftsControllerV2) GetAllTyche(c *gin.Context)

func (*ShiftsControllerV2) GetOpenShifts

func (sc *ShiftsControllerV2) GetOpenShifts(c *gin.Context)

func (*ShiftsControllerV2) GetShiftsByTimestampTyche

func (sc *ShiftsControllerV2) GetShiftsByTimestampTyche(c *gin.Context)

func (*ShiftsControllerV2) GetSingle

func (sc *ShiftsControllerV2) GetSingle(userData hestia.User, params Params) (interface{}, error)

func (*ShiftsControllerV2) GetSingleTyche

func (sc *ShiftsControllerV2) GetSingleTyche(c *gin.Context)

func (*ShiftsControllerV2) Store

func (sc *ShiftsControllerV2) Store(c *gin.Context)

type StatsController

type StatsController struct {
	ShiftModel    *models.ShiftModel
	VouchersModel *models.VouchersModel
	DepositsModel *models.DepositsModel
	OrdersModel   *models.OrdersModel
}

func (StatsController) GetShiftStats

func (sc StatsController) GetShiftStats(userData hestia.User, params Params) (interface{}, error)

func (StatsController) GetVoucherStats

func (sc StatsController) GetVoucherStats(userData hestia.User, params Params) (interface{}, error)

type UsersController

type UsersController struct {
	Model *models.UsersModel
}

func (*UsersController) GetAll

func (uc *UsersController) GetAll(userInfo hestia.User, c *gin.Context, admin bool, filter string) (interface{}, error)

func (*UsersController) GetSingle

func (uc *UsersController) GetSingle(userInfo hestia.User, params Params) (interface{}, error)

func (*UsersController) Store

func (uc *UsersController) Store(userData hestia.User, c *gin.Context) (interface{}, error)

type VouchersAllController

type VouchersAllController struct {
	UserModel           *models.UsersModel
	VouchersModel       *models.VouchersModel
	VouchersV2Model     *models.VouchersModelV2
	VouchersV2TestModel *models.VouchersModelV2
}

func (*VouchersAllController) CopyTestingVoucherV2toProduction

func (va *VouchersAllController) CopyTestingVoucherV2toProduction(c *gin.Context)

func (*VouchersAllController) CopyVoucherV2ToTesting

func (va *VouchersAllController) CopyVoucherV2ToTesting(c *gin.Context)

func (*VouchersAllController) GetVouchersHistory

func (va *VouchersAllController) GetVouchersHistory(userData hestia.User, _ Params) (interface{}, error)

type VouchersCache

type VouchersCache struct {
	Vouchers               map[string]CachedVouchersData
	CachedCountries        []string
	CachedCountriesUpdated int64
	// contains filtered or unexported fields
}

func (*VouchersCache) AddCountryVouchers

func (vc *VouchersCache) AddCountryVouchers(country string, vouchers []bitcou.LightVoucher)

type VouchersCacheV2

type VouchersCacheV2 struct {
	Vouchers               map[string]CachedVouchersDataV2
	CachedCountries        []string
	CachedCountriesUpdated int64
	// contains filtered or unexported fields
}

func (*VouchersCacheV2) AddCountryVouchersV2

func (vc *VouchersCacheV2) AddCountryVouchersV2(country string, vouchers []bitcou.LightVoucherV2)

type VouchersController

type VouchersController struct {
	Model           *models.VouchersModel
	UserModel       *models.UsersModel
	BitcouModel     *models.BitcouModel
	BitcouConfModel *models.BitcouConfModel
	CachedVouchers  VouchersCache
}

func (*VouchersController) AddFilters

func (vc *VouchersController) AddFilters(c *gin.Context)

func (*VouchersController) GetAll

func (vc *VouchersController) GetAll(userData hestia.User, params Params) (interface{}, error)

func (*VouchersController) GetAllLadon

func (vc *VouchersController) GetAllLadon(c *gin.Context)

func (*VouchersController) GetAvailableCountries

func (vc *VouchersController) GetAvailableCountries(userData hestia.User, params Params) (interface{}, error)

func (*VouchersController) GetSingle

func (vc *VouchersController) GetSingle(userData hestia.User, params Params) (interface{}, error)

func (*VouchersController) GetSingleLadon

func (vc *VouchersController) GetSingleLadon(c *gin.Context)

func (*VouchersController) GetTestAvailableCountries

func (vc *VouchersController) GetTestAvailableCountries(_ hestia.User, _ Params) (interface{}, error)

func (*VouchersController) GetTestVouchers

func (vc *VouchersController) GetTestVouchers(userData hestia.User, params Params) (interface{}, error)

func (*VouchersController) GetVouchers

func (vc *VouchersController) GetVouchers(_ hestia.User, params Params) (interface{}, error)

func (*VouchersController) GetVouchersByTimestampLadon

func (vc *VouchersController) GetVouchersByTimestampLadon(c *gin.Context)

func (*VouchersController) Store

func (vc *VouchersController) Store(c *gin.Context)

type VouchersControllerV2

type VouchersControllerV2 struct {
	Model           *models.VouchersModelV2
	UserModel       *models.UsersModel
	BitcouModel     *models.BitcouModel
	BitcouConfModel *models.BitcouConfModel
	CachedVouchers  VouchersCacheV2
}

func (*VouchersControllerV2) AddFilters

func (vc *VouchersControllerV2) AddFilters(c *gin.Context)

func (*VouchersControllerV2) GetAll

func (vc *VouchersControllerV2) GetAll(userData hestia.User, params Params) (interface{}, error)

func (*VouchersControllerV2) GetAllLadon

func (vc *VouchersControllerV2) GetAllLadon(c *gin.Context)

func (*VouchersControllerV2) GetAvailableCountriesV2

func (vc *VouchersControllerV2) GetAvailableCountriesV2(_ hestia.User, _ Params) (interface{}, error)

func (*VouchersControllerV2) GetOpenCountries

func (vc *VouchersControllerV2) GetOpenCountries(c *gin.Context)

func (*VouchersControllerV2) GetProductsByCountry

func (vc *VouchersControllerV2) GetProductsByCountry(c *gin.Context)

func (*VouchersControllerV2) GetProviderImage

func (vc *VouchersControllerV2) GetProviderImage(_ hestia.User, params Params) (interface{}, error)

func (*VouchersControllerV2) GetProviderImageOpen

func (vc *VouchersControllerV2) GetProviderImageOpen(c *gin.Context)

func (*VouchersControllerV2) GetSingle

func (vc *VouchersControllerV2) GetSingle(userData hestia.User, params Params) (interface{}, error)

func (*VouchersControllerV2) GetSingleLadon

func (vc *VouchersControllerV2) GetSingleLadon(c *gin.Context)

func (*VouchersControllerV2) GetTestAvailableCountries

func (vc *VouchersControllerV2) GetTestAvailableCountries(userData hestia.User, params Params) (interface{}, error)

func (*VouchersControllerV2) GetTestVouchersV2

func (vc *VouchersControllerV2) GetTestVouchersV2(userData hestia.User, params Params) (interface{}, error)

func (*VouchersControllerV2) GetUserInfo

func (vc *VouchersControllerV2) GetUserInfo(c *gin.Context)

func (*VouchersControllerV2) GetVoucherInfo

func (vc *VouchersControllerV2) GetVoucherInfo(c *gin.Context)

func (*VouchersControllerV2) GetVouchersByTimestampLadon

func (vc *VouchersControllerV2) GetVouchersByTimestampLadon(c *gin.Context)

func (*VouchersControllerV2) GetVouchersV2

func (vc *VouchersControllerV2) GetVouchersV2(_ hestia.User, params Params) (interface{}, error)

func (*VouchersControllerV2) GetWithComposedQuery

func (vc *VouchersControllerV2) GetWithComposedQuery(c *gin.Context)

func (*VouchersControllerV2) Store

func (vc *VouchersControllerV2) Store(c *gin.Context)

Jump to

Keyboard shortcuts

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