report

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleComment

func HandleComment(
	config *config.Config,
	service core.SCMService,
	repoStore core.RepoStore,
	reportStore core.ReportStore,
	reportService core.ReportService,
) gin.HandlerFunc

HandleComment report summary @Summary Leave a report summary comment on pull request @Tags Report @Param id path string true "report id" @param number path string true "pull request number" @Success 200 {object} string "ok" @Router /reports/{id}/comment/{number} [POST]

func HandleGet

func HandleGet(
	reportStore core.ReportStore,
	repoStore core.RepoStore,
	service core.SCMService,
) gin.HandlerFunc

HandleGet for the report id @Summary get reports for the report id @Tags Report @Param id path string true "report id" @Param latest query bool false "get only the latest report" @Param ref query string false "get report for git ref" @Success 200 {object} core.Report "coverage report" @Router /reports/{id} [get]

func HandleGetBadge

func HandleGetBadge(
	reportStore core.ReportStore,
	repoStore core.RepoStore,
) gin.HandlerFunc

HandleGetBadge for the report id @Summary get badge for the report id @Tags Report @Param id path string true "report id" @Param latest query bool false "get latest report in main branch" @Success 200 {object} string "badge svg" @Router /reports/{id}/badge [get]

func HandleGetCard added in v0.1.3

func HandleGetCard(
	repoStore core.RepoStore,
	reportStore core.ReportStore,
	chartService core.ChartService,
) gin.HandlerFunc

HandleGetCard of the repository status @Summary Get status card of the repository @Tags Report @Produce image/svg+xml @Param id path string true "report id" @Success 200 {object} string "treemap svg" @Router /reports/{id}/card [get]

func HandleGetTreeMap

func HandleGetTreeMap(
	reportStore core.ReportStore,
	repoStore core.RepoStore,
	chartService core.ChartService,
) gin.HandlerFunc

HandleGetTreeMap for coverage difference with main branch @Summary Get coverage difference treemap with main branch @Tags Report @Produce image/svg+xml @Param id path string true "report id" @param source path string true "source branch" @Success 200 {object} string "treemap svg" @Router /reports/{id}/treemap/{ref} [get]

func HandleRepo

func HandleRepo(store core.RepoStore) gin.HandlerFunc

HandleRepo for report id @Summary get repository of the report id @Tags Report @Param id path string true "report id" @Success 200 {object} core.Repo "repository" @Failure 400 {string} string "error message" @Router /reports/{id}/repo [get]

func HandleUpload

func HandleUpload(
	coverageService core.CoverageService,
	reportStore core.ReportStore,
) gin.HandlerFunc

HandleUpload report @Summary Upload coverage report @Tags Report @Param id path string true "report id" @Param file formData file true "report" @Param commit formData string true "Git commit SHA" @Param type formData string true "report type" @Param ref formData string false "ref" @Param root formData string false "git worktree root path" @Param files formData string false "files list of the repository" @Success 200 {string} string "ok" @Failure 400 {string} string "error message" @Router /reports/{id} [post]

func InjectReportContext added in v0.1.9

func InjectReportContext(repoStore core.RepoStore) gin.HandlerFunc

InjectReportContext such as repository, setting according to report id

func MustGetRepo added in v0.1.9

func MustGetRepo(c *gin.Context) *core.Repo

MustGetRepo from context

func MustGetSetting added in v0.1.9

func MustGetSetting(c *gin.Context) *core.RepoSetting

MustGetSetting from context

func ProtectReport added in v0.1.9

func ProtectReport(checkLogin gin.HandlerFunc, repoStore core.RepoStore, service core.SCMService) gin.HandlerFunc

ProtectReport from modifying by unauthorized users

func WithRepo added in v0.1.9

func WithRepo(c *gin.Context, repo *core.Repo)

WithRepo context

func WithSetting added in v0.1.9

func WithSetting(c *gin.Context, setting *core.RepoSetting)

WithSetting context

Types

This section is empty.

Jump to

Keyboard shortcuts

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