contributiongraph

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Badge

type Badge struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Icon        string `json:"icon"`
	Rarity      string `json:"rarity"`
	Requirement string `json:"requirement"`
}

type BadgeEngine

type BadgeEngine struct {
	// contains filtered or unexported fields
}

func NewBadgeEngine

func NewBadgeEngine() *BadgeEngine

func (*BadgeEngine) CheckEarned

func (e *BadgeEngine) CheckEarned(savings int64) []*Badge

func (*BadgeEngine) Get

func (e *BadgeEngine) Get(id string) *Badge

func (*BadgeEngine) List

func (e *BadgeEngine) List() []*Badge

type ContributionDay

type ContributionDay struct {
	Date    string `json:"date"`
	Savings int    `json:"savings"`
	Level   int    `json:"level"`
}

type ContributionGraph

type ContributionGraph struct {
	// contains filtered or unexported fields
}

func NewContributionGraph

func NewContributionGraph() *ContributionGraph

func (*ContributionGraph) AddDay

func (cg *ContributionGraph) AddDay(date string, savings int)

func (*ContributionGraph) Render

func (cg *ContributionGraph) Render(width, height int) string

func (*ContributionGraph) SVGBadge

func (cg *ContributionGraph) SVGBadge() string

func (*ContributionGraph) Stats

func (cg *ContributionGraph) Stats() map[string]interface{}

type KardashevRank

type KardashevRank struct {
	Tier      Tier    `json:"tier"`
	Level     int     `json:"level"`
	Savings   int64   `json:"savings"`
	NextTier  Tier    `json:"next_tier"`
	NextLevel int64   `json:"next_level"`
	Progress  float64 `json:"progress"`
}

func NewKardashevRank

func NewKardashevRank(savings int64) *KardashevRank

type Tier

type Tier string
const (
	TierStarter  Tier = "starter"
	TierBronze   Tier = "bronze"
	TierSilver   Tier = "silver"
	TierGold     Tier = "gold"
	TierPlatinum Tier = "platinum"
	TierDiamond  Tier = "diamond"
	TierLegend   Tier = "legend"
)

Jump to

Keyboard shortcuts

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