public

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Prompt *[]config.Prompt

Functions

func CheckRequest added in v1.0.4

func CheckRequest(ts, sg string) bool

func FirstCheck added in v0.1.3

func FirstCheck(rmsg *dingbot.ReceiveMsg) bool

func GetBalance added in v0.1.4

func GetBalance() (string, error)

GetBalance 获取账号余额

func GetReadTime added in v1.0.10

func GetReadTime(t time.Time) string

func InitAiCli added in v0.1.4

func InitAiCli() *resty.Client

func InitSvc added in v0.1.3

func InitSvc()

func JudgeAdminUsers added in v1.0.7

func JudgeAdminUsers(s string) bool

JudgeAdminUsers 判断用户是否为系统管理员

func JudgeGroup added in v1.0.7

func JudgeGroup(s string) bool

JudgeGroup 判断群ID是否在白名单

func JudgeOutgoingGroup added in v1.0.15

func JudgeOutgoingGroup(s string) bool

JudgeOutgoingGroup 判断群ID是否在为outgoing白名单

func JudgeUsers added in v1.0.7

func JudgeUsers(s string) bool

JudgeUsers 判断用户是否在白名单

func JudgeVipUsers added in v1.0.14

func JudgeVipUsers(s string) bool

JudgeVipUsers 判断用户是否为VIP用户

func WriteToFile added in v1.0.7

func WriteToFile(path string, data []byte) error

将内容写入到文件,如果文件名带路径,则会判断路径是否存在,不存在则创建

Types

type Bill added in v1.0.13

type Bill struct {
	Object     string      `json:"object"`
	DailyCosts []DailyCost `json:"daily_costs"`
	TotalUsage float64     `json:"total_usage"`
}

type DailyCost added in v1.0.13

type DailyCost struct {
	Timestamp float64    `json:"timestamp"`
	LineItems []LineItem `json:"line_items"`
}

type LineItem added in v1.0.13

type LineItem struct {
	Name string  `json:"name"`
	Cost float64 `json:"cost"`
}

type Plan added in v1.0.13

type Plan struct {
	Title string `json:"title"`
	ID    string `json:"id"`
}

type Subscription added in v1.0.13

type Subscription struct {
	Object             string      `json:"object"`
	HasPaymentMethod   bool        `json:"has_payment_method"`
	Canceled           bool        `json:"canceled"`
	CanceledAt         interface{} `json:"canceled_at"`
	Delinquent         interface{} `json:"delinquent"`
	AccessUntil        int64       `json:"access_until"`
	SoftLimit          int64       `json:"soft_limit"`
	HardLimit          int64       `json:"hard_limit"`
	SystemHardLimit    int64       `json:"system_hard_limit"`
	SoftLimitUsd       float64     `json:"soft_limit_usd"`
	HardLimitUsd       float64     `json:"hard_limit_usd"`
	SystemHardLimitUsd float64     `json:"system_hard_limit_usd"`
	Plan               Plan        `json:"plan"`
	AccountName        string      `json:"account_name"`
	PoNumber           interface{} `json:"po_number"`
	BillingEmail       interface{} `json:"billing_email"`
	TaxIDS             interface{} `json:"tax_ids"`
	BillingAddress     interface{} `json:"billing_address"`
	BusinessAddress    interface{} `json:"business_address"`
}

func GetSub added in v1.0.13

func GetSub() (Subscription, error)

Jump to

Keyboard shortcuts

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