badge

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Colors = statusToColors{

	Default: "#527284",
	// contains filtered or unexported fields
}

Colors is used to harmonize status colors for all badges

Functions

func StatusBadge

func StatusBadge(s storage.Storage, latest bool) func(http.ResponseWriter, *http.Request)

StatusBadge handles request to for a badge task status request

func WriteBadge

func WriteBadge(label string, content string, color badge.Color, w http.ResponseWriter) error

WriteBadge is a wrapper use to write a badge into an http response

Types

type Badge

type Badge struct {
	Subject string `json:"subject"`
	Status  string `json:"status"`
	Color   string `json:"color"`
}

func (*Badge) Render

func (b *Badge) Render(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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