config

package
v1.3.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

func New

func New(getter kv.Getter) Config

type Level

type Level struct {
	Level             int  `fig:"lvl,required"`
	Threshold         int  `fig:"threshold,required"`
	Referrals         int  `fig:"referrals,required"`
	WithdrawalAllowed bool `fig:"withdrawal_allowed"`
}

type Levels

type Levels map[int]Level

func (Levels) LvlUp

func (l Levels) LvlUp(currentLevel int, totalAmount int64) (refCoundToAdd int, newLevel int)

LvlUp Calculates new lvl. New lvl always greater then current level

func (Levels) MinLvl

func (l Levels) MinLvl() int

type PointsPrice

type PointsPrice struct {
	PointPriceURMO int64 `fig:"point_price_urmo,required"`
	Disabled       bool  `fig:"disabled"`
}

Jump to

Keyboard shortcuts

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