Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type ExLoyaltyContribute
- type ExLoyaltyRedeem
- type Goal
- type GoalStorage
- type Manager
- func (m *Manager) AddRedeem(redeem Redeem) error
- func (m *Manager) Close() error
- func (m *Manager) Config() Config
- func (m *Manager) ContributeGoal(goal Goal, user string, points int64) error
- func (m *Manager) GetGoal(id string) Goal
- func (m *Manager) GetPoints(user string) int64
- func (m *Manager) GetReward(id string) Reward
- func (m *Manager) GetRewardCooldown(rewardID string) time.Time
- func (m *Manager) GivePoints(pointsToGive map[string]int64) error
- func (m *Manager) Goals() []Goal
- func (m *Manager) PerformContribution(goal Goal, user string, points int64) error
- func (m *Manager) PerformRedeem(redeem Redeem) error
- func (m *Manager) RemoveRedeem(redeem Redeem) error
- func (m *Manager) Rewards() []Reward
- func (m *Manager) SaveGoals() error
- func (m *Manager) TakePoints(pointsToTake map[string]int64) error
- type OldPointStorage
- type PointsEntry
- type Redeem
- type RedeemQueueStorage
- type Reward
- type RewardStorage
Constants ¶
View Source
const ConfigKey = "loyalty/config"
View Source
const CreateRedeemRPC = "loyalty/@create-redeem"
View Source
const GoalsKey = "loyalty/goals"
View Source
const KVExLoyaltyContribute = "stulbe/loyalty/@contribute-rpc"
View Source
const KVExLoyaltyRedeem = "stulbe/loyalty/@redeem-rpc"
View Source
const OldPointsKey = "loyalty/users"
View Source
const PointsPrefix = "loyalty/points/"
View Source
const QueueKey = "loyalty/redeem-queue"
View Source
const RedeemEvent = "loyalty/ev/new-redeem"
View Source
const RemoveRedeemRPC = "loyalty/@remove-redeem"
View Source
const RewardsKey = "loyalty/rewards"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ExLoyaltyContribute ¶ added in v1.7.0
type ExLoyaltyRedeem ¶ added in v1.7.0
type GoalStorage ¶
type GoalStorage []Goal
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func (*Manager) ContributeGoal ¶ added in v1.1.0
func (*Manager) GetRewardCooldown ¶ added in v1.5.0
func (*Manager) PerformContribution ¶ added in v1.4.0
func (*Manager) PerformRedeem ¶ added in v1.4.0
func (*Manager) RemoveRedeem ¶
type OldPointStorage ¶ added in v1.3.0
type PointsEntry ¶ added in v1.3.0
type PointsEntry struct {
Points int64 `json:"points"`
}
type RedeemQueueStorage ¶
type RedeemQueueStorage []Redeem
type RewardStorage ¶
type RewardStorage []Reward
Click to show internal directories.
Click to hide internal directories.