badge

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIconsMap added in v1.1.1

func GetIconsMap() map[string]Icon

GetIconsMap returns cloned iconsMap.

Types

type Badge

type Badge struct {
	FontType FontType

	LeftText            string
	LeftTextColor       string
	LeftBackgroundColor string

	RightText            string
	RightTextColor       string
	RightBackgroundColor string

	XRadius string
	YRadius string
}

type FontType

type FontType int
const (
	VeraSans FontType = 1 + iota
	Verdana
)

type Icon added in v1.1.1

type Icon struct {
	Name   string
	Origin []byte
}

type Writer

type Writer interface {
	RenderFlatBadge(b Badge) ([]byte, error)
	RenderIconBadge(b Badge, iconName, iconColor string) ([]byte, error)
}

Writer is an interface generating Badge formatted SVG.

func NewWriter

func NewWriter() (Writer, error)

NewWriter returns Badge Writer.

Jump to

Keyboard shortcuts

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