Help us shape the future of Go! Take the 2026 Go Developer Survey

cal

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawPieChartWithAPI

func DrawPieChartWithAPI(ctx context.Context, inputMap map[string]time.Duration, userName string) (string, error)

DrawPieChartWithAPI 本地获取频道的时间分布

@param inputMap
@param userName
@return string

func DrawPieChartWithLocal

func DrawPieChartWithLocal(ctx context.Context, inputMap map[string]time.Duration, userName string) (string, error)

DrawPieChartWithMermaid 12

@param ctx
@param inputMap
@param userName
@return string
@return error

func DrawPieChartWithLocal1

func DrawPieChartWithLocal1(ctx context.Context, inputMap map[string]time.Duration, userName string) (string, error)

DrawPieChartWithLocal 本地获取频道的时间分布

@return {}

func GetUserChannelTimeMap

func GetUserChannelTimeMap(ctx context.Context, userID, guildID string) map[string]time.Duration

GetUserChannelTimeMap 获取用户在频道的时间

@param userID
@return map

func ShowCalHandler

func ShowCalHandler(ctx context.Context, targetID, quoteID, authorID, guildID string, args ...string) (err error)

ShowCalHandler 显示时间分布

@param userID

func ShowCalLocalHandler

func ShowCalLocalHandler(ctx context.Context, targetID, quoteID, authorID, guildID string, args ...string) (err error)

ShowCalLocalHandler sc

@param drawCtx
@param targetID
@param msgID
@param authorID
@param guildID
@param args
@return err

Types

type AnimationTime

type AnimationTime int

AnimationTime 动画时长

type AnimationType

type AnimationType string

AnimationType 动画类型

type ChartType

type ChartType string

ChartType 图表类型 p: 2 dimension pc: more than 1 dimension pd: donut

type DrawChartLabel

type DrawChartLabel struct {
	Text []string
	Size int
}

DrawChartLabel 画图标签

type DrawChartLegend

type DrawChartLegend struct {
	Text     []string
	Size     int
	Color    string
	Position string //chdlp:b,t,l,r
}

DrawChartLegend 画图标签

type DrawChartTitle

type DrawChartTitle struct {
	Text  string
	Size  int
	Color string // RGB,eg: FF0000,20,r
}

DrawChartTitle 画图标题

type DrawPieAPICtx

type DrawPieAPICtx struct {
	Ct        ChartType // bvs,p,ls
	Title     DrawChartTitle
	Label     DrawChartLabel
	Legend    DrawChartLegend
	Data      []string
	IsDivided bool
	Color     string
	Size      string
}

DrawPieAPICtx 画饼图的上下文

func (*DrawPieAPICtx) BuildRequestURL

func (drawCtx *DrawPieAPICtx) BuildRequestURL() string

BuildRequestURL 构建请求URL

@receiver drawCtx
@return string

Jump to

Keyboard shortcuts

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