Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAuthentificationFailed = errors.New("invalid secret provided")
View Source
var ( // FuncMap for template rendering FuncMap = template.FuncMap{ "colors": func(commit model.Commit) string { if color, ok := colors.Load(commit.Repository); ok { return color.(string) } colorsCount++ nextColor := repositoriesColors[colorsCount%len(repositoriesColors)] colors.Store(commit.Repository, nextColor) return nextColor }, "contains": contains, "dateDistanceInDays": diffInDays, "toggleParam": func(path string, params url.Values, name, value string) string { safeValues := url.Values{} done := false for key := range params { currentValue := params.Get(key) if len(currentValue) == 0 { continue } if key == name { done = true } else { safeValues.Set(key, currentValue) } } if !done { safeValues.Set(name, value) } if len(safeValues) == 0 { return path } return fmt.Sprintf("%s?%s", path, safeValues.Encode()) }, } )
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (App) TemplateFunc ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.