deduction

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnitTimeNoLimit = "NoLimit"
	UnitTimeYear    = "Year"
	UnitTimeMonth   = "Month"
	UnitTimeDay     = "Day"
	UintTimeHour    = "Hour"
	UintTimeMinute  = "Minute"

	ResetCycleNone    = 0
	ResetCycle1st     = 1
	ResetCycleMonthly = 2
	ResetCycleYear    = 3
)

Variables

This section is empty.

Functions

func CalculateRemainingAmount

func CalculateRemainingAmount(sub Subscribe, order Order) int64

Types

type Order

type Order struct {
	Amount   int64
	Quantity int64
}

type Subscribe

type Subscribe struct {
	StartTime      time.Time
	ExpireTime     time.Time
	Traffic        int64
	Download       int64
	Upload         int64
	UnitTime       string
	UnitPrice      int64
	ResetCycle     int64
	DeductionRatio int64
}

Jump to

Keyboard shortcuts

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