Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBaseCurrencyEmpty - empty base currency ErrBaseCurrencyEmpty = errors.New("currency cannot be empty") // ErrBaseCurrencyInvalid - indicates there is a validation issue with the currency ErrBaseCurrencyInvalid = errors.New("invalid currency") )
Functions ¶
func GetParametersHandler ¶
func GetParametersHandler(service *Service) handlers.AppHandler
Types ¶
type AutoContribute ¶
type AutoContribute struct { Choices []float64 `json:"choices,omitempty"` DefaultChoice float64 `json:"defaultChoice,omitempty"` }
AutoContribute - reward parameters about ac (votes)
type BaseCurrency ¶
type BaseCurrency string
BaseCurrency - type for base currency input
func (*BaseCurrency) Decode ¶
func (rbc *BaseCurrency) Decode(ctx context.Context, v []byte) error
Decode - implement decodable
func (*BaseCurrency) String ¶
func (rbc *BaseCurrency) String() string
String - stringer implmentation
type CardsConfig ¶
type Config ¶
type Config struct { TOSVersion int Cards *CardsConfig }
type ParametersV1 ¶
type ParametersV1 struct { PayoutStatus *custodian.PayoutStatus `json:"payoutStatus"` CustodianRegions *custodian.Regions `json:"custodianRegions"` BATRate float64 `json:"batRate,omitempty"` AutoContribute AutoContribute `json:"autocontribute,omitempty"` Tips Tips `json:"tips,omitempty"` Transition bool `json:"vbatExpired"` VBATDeadline *time.Time `json:"vbatDeadline,omitempty"` TOSVersion int `json:"tosVersion,omitempty"` }
ParametersV1 - structure of reward parameters
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func InitService ¶
InitService initializes a new instance of the rewards service.
func (*Service) GetCardsAsBytes ¶
func (*Service) GetParameters ¶
func (s *Service) GetParameters(ctx context.Context, currency *BaseCurrency) (*ParametersV1, error)
Click to show internal directories.
Click to hide internal directories.