usage

package
v0.0.0-...-c452e5e Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const CmdExtend = "lim_extend"
View Source
const CmdIncrease = "lim_incr"
View Source
const ExpiresDefaultDays = 30
View Source
const LabelExtend = "▲ Extend Time"
View Source
const LabelIncrease = "▲ Increase Limit"
View Source
const PurposeLimitSet = "lim_set"
View Source
const ReqLimitExtend = "lim_extend_req"
View Source
const ReqLimitIncrease = "lim_incr_req"

Variables

This section is empty.

Functions

func FormatUsageLimit

func FormatUsageLimit(subj string, u usage.Usage, l usage.Limit) (txt string)

Types

type LimitsHandler

type LimitsHandler struct {
	CfgPayment     config.PaymentConfig
	ClientAdmin    admin.Service
	ClientAwk      api.Client
	GroupId        string
	Log            *slog.Logger
	SupportHandler support.Handler
}

func (LimitsHandler) HandleExtension

func (lh LimitsHandler) HandleExtension(tgCtx telebot.Context, args ...string) (err error)

func (LimitsHandler) HandleIncrease

func (lh LimitsHandler) HandleIncrease(tgCtx telebot.Context, args ...string) (err error)

func (LimitsHandler) HandleLimitOrderPaid

func (lh LimitsHandler) HandleLimitOrderPaid(tgCtx telebot.Context, args ...string) (err error)

func (LimitsHandler) IncreasePreCheckout

func (lh LimitsHandler) IncreasePreCheckout(tgCtx telebot.Context, args ...string) (err error)

func (LimitsHandler) PreCheckout

func (lh LimitsHandler) PreCheckout(tgCtx telebot.Context, args ...string) (err error)

func (LimitsHandler) RequestExtension

func (lh LimitsHandler) RequestExtension(tgCtx telebot.Context, args ...string) (err error)

func (LimitsHandler) RequestIncrease

func (lh LimitsHandler) RequestIncrease(tgCtx telebot.Context, args ...string) (err error)

type OrderLimit

type OrderLimit struct {
	Expires time.Time     `json:"expires"`
	Count   uint32        `json:"count"`
	Subject usage.Subject `json:"subject"`
}

Jump to

Keyboard shortcuts

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