template

package
v0.0.0-...-6a19c51 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gen

func Gen(wr io.Writer, theme string, filesList []FileList, pages map[string]*Page, visiblePages *VisiblePages)

Gen erate Template

Types

type Content

type Content struct {
	Tracked bool   `json:"tracked"` // If the content is tracked by coverage or not
	Count   int    `json:"count"`
	Content string `json:"content"`
}

Content of lines

type FileList

type FileList struct {
	Name     string  `json:"name"`
	Lines    int     `json:"lines"`
	Green    int     `json:"green"`
	Red      int     `json:"red"`
	Coverage float32 `json:"coverage"`
}

FileList information to be used on template list of files

type HTMLData

type HTMLData struct {
	Theme        string
	ThemeBGColor string
	Styles       []string
	Vue          string
	Scripts      []string
	//FileList expect to be a valid json array of fileList
	FilesList    string
	Pages        map[string]*Page
	VisiblePages string
	PagesInJSON  string
}

HTMLData is the data struct that will be used on template generator

type Line

type Line struct {
	Line     int       `json:"line"`
	Contents []Content `json:"contents"`
}

Line information

type Page

type Page struct {
	FullName string `json:"full-name"`
	Lines    []Line `json:"lines"`
}

Page Information

type VisiblePages

type VisiblePages struct {
	Current string          `json:"current"`
	List    map[string]bool `json:"list"`
}

Jump to

Keyboard shortcuts

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